tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fnystal <fnys...@get2net.dk>
Subject context parameters
Date Sun, 08 Oct 2000 08:07:52 GMT
I have added the following data to a web.xml file, in the hope that I could 
point to a configuration file.  From the logs, I can see that the file is 
read (I got duplicate errors, before I delete the stuff from the default 
web.xml in the $TOMCAT/conf dir.

    <context-param>
         <param-name>conf</param-name>
         <param-value>/usr/local/tomcat/webapps/xitema/WEB-INF/classes/InetSale/InetSale.conf</param-value>
    </context-param>

I have a test servlet which reads all init parameter with the following code:

       out.println("<BR>Initparameters:");
       Enumeration e = getServletConfig().getInitParameterNames();
       String tmps = null;
       while (e.hasMoreElements()) {
         if ((tmps=(String)e.nextElement())!=null)
           out.println("<BR>InitParam "+tmps+" = "+ 
getServletConfig().getInitParameter(tmps));
       }

Unfortunately this doesn't return any init parameters.
Please help.....  I'm trasnferring my project from JServ to Tomcat in order 
to user the news servlet API.  In JServ, I added a defaultinitparam to the 
zone.properties file and it worked.


Mime
View raw message