Hi

I'd like to read an element from /Apache Software Foundation/Tomcat 5.5/conf/context.xml file from my program.

The element is one of many Parameter elements of the form <Parameter name="foo" value="bar"/>
The context.xml is laid out as

< <Context allowLinking="*true*" disableProxyCaching="*true*" cachingAllowed="*false*">
-
      <WatchedResource>WEB-INF/web.xml</WatchedResource>
      <WatchedResource>META-INF/context.xml</WatchedResource>
-
<Parameter name="*javax.faces.STATE_SAVING_METHOD*" value="*client*" override="*false*" /> = <Parameter name="*com.sun.faces.verifyObjects*" value="*false*" override="*false*" /> <Parameter name="*admin_dir_prefix*" value="*/svp/pkg*" override="*false*" />
     etc etc

</Context>


I would like to put the code at the start of the MyappnameBindingImpl.java of a (axis1.4 based) web services app. The value to be gotten is the text of a partial file path.

I've googled and found various pieces of code of the form

String bar;
HttpServlet servletContext =
(HttpServlet)MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET);
               bar  = servletContext.getInitParameter( "foo");

But this does not seem to be what's required. The context.xml is not part of the web-app servlet directory tree, its in Tomcat's conf directory.

Id appreciate some advice on getting to the "value" in a Parameter element given the "name" using a Tomcat?? Axis?? api.

A concrete example, a reference to an example on the web or an explanation on how to proceed would help a lot.

Thanks in advance for any help

Lenny Wintfeld





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to