In list.tomcat-user you write:
> We have a web application distributed in a WAR file that consists of
> servlets that were compiled from JSPs, one index.jsp file and a number of
> JavaBeans and JAR files on Tomcat 3.2.1. When Tomcat is started, it unpacks
> the war file correctly with everything in its place. However, part of the
> initialization process contained in the index.jsp is to attempt to read a
> properties file to obtain the DB connection info. It is the attempt to read
> this properties file that causes the NullPointerException. This only happens
> when Tomcat has expanded the WAR file. If Tomcat is stopped and started
> again, everything works, the property files are found and read.

I haven't tried this from a WAR file, but you could use the following
instead:

        application.getResourceAsStream( "/WEB-INF/db.props" );

Where "application" is the ServletContext implicit object.

-- 
 `O O'  | [EMAIL PROTECTED]
// ^ \\ | http://www.pyrites.org.uk/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to