tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Hanson <ghan...@AllMeetings.com>
Subject RE: wrapper.bin.parameters
Date Wed, 09 May 2001 17:40:25 GMT
Using web.xml for defining the context of the parameter is fine as long as
that param is servlet explicit.  This model breaks down when you try to
define the property globally.  Is there a way to specify the global property
in tomcat.sh?  I have tried it there as well and the runtime env still
doesn't set the -D options.  Anyone?

Greg  

-----Original Message-----
From: William Kaufman [mailto:WKaufman@viquity.com]
Sent: Wednesday, May 09, 2001 7:13 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: RE: wrapper.bin.parameters


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