You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by us...@mithi.com on 2002/05/06 09:01:39 UTC
How to pass a global parameter to all servlet of a webapp
I have a webapplication which has 20/25 servlets, I have kept all global settings of the webapp in a property file and want to pass these property file path to all servlet .
I came to know that for individual servlet I can define init parameters as
<init-param>
<param-name>foo</param-name>
<param-value>bar</param-value>
</init-param>
But again defining these for all servlet is a problem, so I am looking for a settings which will be accessible to all servlet from a webapp.
One way which I can think of is to pass argument to java using CATALINA_OPTS, but then it becomes accessible to all webapps.
So please tell me if there is any way to have gloabl init parameters for all servlet/JSPs of a webapp?
thanks
Amol
--------------------------------------------
Email in Indian languages.
This mail has been sent to you from http://mithi.com.