Re: Template with DB interaction

Nicolas Lafaury <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Hello

the first possibility is to take the Jahia connexion.

for example :

java.sql.Connection connInscription =
org.jahia.services.database.ConnectionDispenser.getConnection();

if (connInscription!=null) {

java.sql.ResultSet rsAbonnement = null;

java.sql.Statement statement =
connInscription.createStatement();

statement.executeUpdate("CREATE TABLE IF NOT EXISTS
"+nameBDInscription+" (id CHAR(16), name CHAR(30),validation CHAR(3))");

Nicolas

Sanjay Goel a écrit :

Hi,

I want to create a template similar to the web form generator template,
save all the data in a table and then create a view template for the
same.

How to I make a template jsp interact with the DB?

Thanks

Sanjay Goel

http://sanjaygoel.blogspot.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.