Howdy,
Context parameters are available to anything running within your context
as long as the server is up.  You access them from a servlet (any method
in the servlet, not just init(), using
getServletContext().getInitParameter("paramName");

Context parameters are not typically tunable at runtime from the
container (in this case tomcat) administration module.

For that, you have to use the more heavyweight environment resource JNDI
mechanism.  For tomcat, there's a how-to here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.htm
l

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Jim Henderson [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 28, 2003 12:39 PM
>To: [EMAIL PROTECTED]
>Subject: Configuration Variables
>
>
>I can not seem to find this in my books, can someone explain this?
>
>What WAR file web.xml parameter can be used to pass application wide
(not
>just a single Servlet or JSP) configuration data to JSP/Servlet that
also
>is adjustable from Tomcat-Administrator control page, and what Java
methods
>(xxx.getYyyy("parmName")) do I use to access the data given the
parameter
>name?  I would like to access the parameter from the program at any
time,
>and not just when the Servlet is loaded (init time).
>
>I wish the O'Reilly book clearly explained the relationships of the
Java
>accessor methods, the web.xml parameters, and the Tomcat Admin options.
I
>seem to have gone round and round with this and now I'm lost.
>
>Thanks!

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to