I want to add some data into the application context of my web application.
I have tried to bind a listener to the application context, and I have tried to have a servlet with an load-on-startup parameter. Both of these fail as the attempt to find the context can't find the context. If I use a servlet to run the various calls once the application has finished starting up everything is cool. Is this because the <resource-ref> is last in web.xml and means that I simply can't do this? And does anyone have an alternative they could suggest?
Andrew [ March 23, 2005: Message edited by: andrew low ]
It sounds like this is more of a deployment descriptor issue than a tomcat issue. It would help if you posted any error message(s) and your web.xml.
Joined: Mar 22, 2005
The error is
Cannot create JDBC driver of class '' for connect URL 'null'
java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) at com.xxxx.phonelist.country.CountryListDAO.<init>(CountryListDAO.java:22) at com.xxxx.phonelist.init.StartUp.init(StartUp.java:24) at javax.servlet.GenericServlet.init(GenericServlet.java:256
and the web.xml is as follows, but I can use this JNDI connection once the application is up and running.