axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lenny Wintfeld <>
Subject How to get an init parameter from Axis in my web services method
Date Thu, 14 Dec 2006 17:26:16 GMT

I've been trying (and failing so far) to get an init parameter from axis 
in my web services method.

Ideally I'd like to get the init parameter value from 

If that's not possible I could get it from 
or from [TOMCATPATH]/webapps/axis/WEB-INF/context.xml.

The code I've been trying to use (unsucessfully) to do this, is at the 
start of the web services method implementation in  
[MyService] :

                String infoOfInterest;
                HttpServlet servletContext =

                infoOfInterest  = servletContext.getInitParameter( 

The code snippet shown above compiles and runs fine but the call to 
getInitParameter("admin_dir_prefix") always returns null.

The [TOMCATPATH]/conf/context.xml  and the 
bot look like:

<Context allowLinking="true" disableProxyCaching="true" 
       <Parameter name="admin_dir_prefix" value="/home/pkg" 

The [TOMCATPATH]/webapps/axis/WEB-INF/web.xml looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "">


Can someone tell me what I'm doing wrong and or how to go about getting 
a Parameter "value", given it's "name" from any of the above xml files?
Preferably from the [TOMCATPATH]/conf/context.xml, but at this point, 
I'd be happy to get it from anywhere !

Thanks in advance for any advice or any corrections to my code or xml's 
that might get this to work.

Lenny Wintfeld

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message