tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Kaufman <WKauf...@viquity.com>
Subject RE: wrapper.bin.parameters
Date Wed, 09 May 2001 14:12:49 GMT
You can define this in your <web-app> element in tomcat\conf\web.xml.  For
instance,

<web-app>
  <servlet>
    <servlet-name>fred</servlet-name>
    <servlet-class>your.class.here</servlet-class>
  </servlet>
  <context-param>
    <param-name>ini-directory</param-name>
    <param-value>c:/</param-value>
    <description>Directory containing INI files</description>
  </context-param>
</web-app>

BTW, you might want to replace your INI files with Java properties files: a)
the code to read/write them already exists, in java.util.Properties; and, b)
you can use java.util.ResourceBundle to load them, rather than making people
edit your web config file.

                                                            -- Bill K.


> -----Original Message-----
> From: SAMEUNIE@bouyguestelecom.fr [mailto:SAMEUNIE@bouyguestelecom.fr]
> Sent: Wednesday, May 09, 2001 3:49 AM
> To: tomcat-user@jakarta.apache.org
> Subject: wrapper.bin.parameters
> 
> 
> Hi, i 've just installed Tomcat,
> I would like to define init parameters for the JVM,
> For example, for the "ini directory" where i stock my .ini 
> files, i would
> like to define an environment variable.
> I used to do this with an old version of Apache Jserv 
> (without JSP) like
> that
> int the JServ.properties file i wrote : 
> wrapper.bin.parameters=-D MYSITE_INI=c:\ ....
> 
> and in my servlet I just needed : 
> String path = System.getProperty("MYSITE_INI");
> 
> I don't know how to do the same thing with TOMCAT. I did the same
> manipulation in the tomcat.properties file,
> and in my servlet, i get a null !!!
> 
> Hope you'll have a few minutes to answer me
> Thanks
> Sandrine(France).
> 

Mime
View raw message