Thanks for the response, but I actually want to retrieve the properties
that have been set for the connectors. More specifically, my web
application supports both http and https communication. However, over
http, it uses the same keystore being used by the SSL Connector to
authenticate with the client. Currently, I have to put the path to the
keystore file in both server.xml and a separate properties file. Is
there some way I can get this path directly from server.xml instead of
having to put it in another file as well?
Thanks
Tahir.
wrote:
> To be more specific, you can set the context params in your
serverl.xml
> and then retrieve them by:
> 1. Get the ServletConfig object using Servlet.getServletConfig()
> 2. Get the ServletContext object using
> ServletConfig.getServletContext()
> 3. Get the parameter using ServletContext.getAttribute()
>
> Since each app server will only have one ServletContext object, the
> values are shared by all web application. If you want to make the
> values specific to just one servlet, you can specify the parameters
> inside your application's web.xml as:
> <servlet>
> ......
> <init-param>
> <param-name>foo</param-name>
> <param-value>bar</param-value>
> </init-param>
> </servlet>
>
> You can then retrive the values using
ServletConfig.getInitParameter().
>
> Hope it helps.
>
> hitecta...@hotmail.com wrote:
> > Hi,
> >
> > I want to use the settings I make in server.xml for Tomcat
> > configuration in my web application as well. Is there some way I
can
> > use the values stored in server.xml directly through my web
> application
> > code instead of having to store them in another properties file?
> >
> > Regards
> > Tahir.