<resource-ref> <description> Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file </description> <res-ref-name> jdbc/jspbook </res-ref-name> <res-type> javax.sql.DataSource </res-type> <res-auth> Container </res-auth> </resource-ref> Thank you Filip.
Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote: what did you put in your web.xml? Filip Edward Manalansan wrote: > Hi there, > > I've trying to setup a Datasource in Tomcat 5.028 and I can't get it to work. > I've meticulously followed the tomcat documentation and still no luck. I went > into several famous forums and still didn't work. > > For starter, I tried adding the Datasource manually in the admin screen and > was able to save it, however, I don't see the Datasouce entry anywhere in > Tomcat files, specifically the ...conf/server.xml. > > Here my code in server.xml > . > existing code > . > > debug="0" priveleged="true"> > > auth="Container" > type="javax.sql.DataSource"/> > > > username > sa > > > password > > > > driverClassName > org.hsqldb.jdbcDriver > > > url > jdbc:hsqldb:/usr/Tomcat 5.0/webapps/jspbook_site/WEB-INF/jspbookdb > > > > > Here is my call to the Datasouce... > > . > . > InitialContext ctx = new InitialContext(); > DataSource ds = > (DataSource)ctx.lookup("java:comp/env/jdbc/jspbook_site"); > Connection conn = ds.getConnection(); > > . > . > > I verified that org.hsqldb.jdbcDriver is working when using DriverManager > class. > > Thank you very much. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]