Hi,
You can use "ServletContext.getResource and then parse
The returned URL" to overcome this kind of issues.

Thanx
Sidd

-----Original Message-----
From: Ruane, Conleth [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 13, 2003 7:41 AM
To: [EMAIL PROTECTED]
Subject: Accessing text files in SOAP service folder


Hi All.

I'm writing my first SOAP service using Apache SOAP.
I've run into a problem I can't find a solution for after a lot of
searching.

I want my service to pull some settings from a text file which is in the
same 
folder as the service classes but if I use just the file name I get a
fileNotFoundException. I've established that the file is being looked
for in the tomcat bin folder instead of the folder where the classes
are. I want to avoid using a hardcoded absolute path.

A similar problem in my jsp pages I solved using
             workingDir =
pageContext.getServletContext().getRealPath(request.getServletPath());

Can I do something similar in a soap service class or is there any good
way to do what I want.

Thanks

Con

Reply via email to