Tomcat Soap pass parameter
2 posts in topic
Flat View  Flat View

Posted By:   Joe_Croce
Posted On:   Wednesday, July 20, 2005 11:43 AM

Hello all,

I have a burning question that I think has a simple solution. I have a SOAP service running under Apache Tomcat Soap and I need to access a text file, that contains configuration information, from the Hard Disk. Right now, I’m hardcoding the location but I would like to have this as a variable. How the heck do I do this? Web.xml???


Re: Tomcat Soap pass parameter

Posted By:   Joe_Croce  
Posted On:   Thursday, July 21, 2005 05:29 PM

Hi HTH Ed,

Well, I did learn something, web.xml is the way to
do it if your web service is a servlet (meaning the service that I built). But the service that I built doesn't extend servlet. It just uses the soap stuff. Is it still possible to pass parameters? How about this: If I'm correct, the soap service is a servlet since there's stuff configured in the web.xml. Could I pass something to the SOAP servlet and use it in my service? I tried going down this road with no luck.

And yes, this may be the wrong place so if I'm unsuccesful here, I'll be posting it under Tomcat.


Re: Tomcat Soap pass parameter

Posted By:   Ed_Hoden  
Posted On:   Wednesday, July 20, 2005 04:13 PM

Probably more properly a question for the Tomcat forum, but yeah, stash it in your web.xml file.



Then in your servlet you can access the value you stashed there

String myVal = servletContext.getInitParameter( "myParamName" );

About | Sitemap | Contact