tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ursula Pieper <>
Subject Properties file declaration
Date Tue, 26 Feb 2002 15:09:01 GMT


my servlets need to access a properties file 

I tried to get the parameter to read properly by adding parameter entries 
at different location. so now:

My server.xml entry looks like this:

<Context path="/application" docBase="application" debug="9" 
<Parameter name="CONFIG_FILE" 

and the web.xml:



This entry gets recognized at tomcat startup:
in catalina.out: 
XmlMapper: org.apache.catalina.core.StandardContext.addParameter( CONFIG_FILE, 

The call for is in the servlet looks like this:

init(ServletConfig config)
throws ServletException
             configPrefs = new Properties();
             servletContext = config.getServletContext();
             if ( config.getInitParameter("CONFIG_FILE") == null )
             throw new ServletException( "No CONFIG_FILE param" );

and I am getting the following error message:
javax.servlet.ServletException: No CONFIG_FILE param

Can anybody help me straighten this out?

I am new to this and want to get this application to run. I am just now 
learning java and tomcat, so please excuse my probably trivial question. 

I am running 
Tomcat 4.0.1
on redhat 7.2

Thanks a lot!


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message