tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Configuration Variables
Date Tue, 28 Jan 2003 17:45:01 GMT
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:jgh@metafile.com]
>Sent: Tuesday, January 28, 2003 12:39 PM
>To: tomcat-user@jakarta.apache.org
>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:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message