Re: read file inside WEB-INF

2006-10-23 Thread Christopher Schultz
Dies, >> But if he's using something like Axis, then there is no ServletContext >> around to use IIRC. > > Actually, there is. You can get it with > javax.xml.rpc.server.ServletEndpointContext#getServletContext(). Thanks! You learn something new every day ;) -chris signature.asc Description:

Re: read file inside WEB-INF

2006-10-23 Thread Dies Koper
> But if he's using something like Axis, then there is no ServletContext > around to use IIRC. Actually, there is. You can get it with javax.xml.rpc.server.ServletEndpointContext#getServletContext(). Regards, Dies Christopher Schultz wrote: Tomas, 2) Then the code will be independent of t

Re: read file inside WEB-INF

2006-10-20 Thread Christopher Schultz
Tomas, > 2) Then the code will be independent of the servlet API > > InputStream in = > my_class_name.class.getResourceAsStream("/my_configuration"); Not a bad idea. The use of the term "web service init" made me think of a webapp initializer, in which case, he's already tied to the servlet API.

Re: read file inside WEB-INF

2006-10-20 Thread Tomas Hulek
Or, alternatively, you can just rely on the class loader which loaded your servlet and it for a Java resource. 1) Put the configuration file under WEB-INF/classes. 2) Then the code will be independent of the servlet API InputStream in = my_class_name.class.getResourceAsStream("/my_configuration"

Re: read file inside WEB-INF

2006-10-20 Thread Christopher Schultz
Nuno, > I have a web-service that i'am trying to pack it in a war file. > I am trying to store configuration files into WEB-INF/data directory. In > my web-service init method, I have to load the configuration file that > was stored in WEB-INF/data directory. Is it possible? How can I do it? (fro

Re: read file inside WEB-INF

2006-10-20 Thread Steve Ochani
On 20 Oct 2006 at 16:06, Nuno Martins wrote: > Hi, > > I have a web-service that i'am trying to pack it in a war file. > I am trying to store configuration files into WEB-INF/data directory. > In my web-service init method, I have to load the configuration file > that was stored in WEB-INF/data d

read file inside WEB-INF

2006-10-20 Thread Nuno Martins
Hi, I have a web-service that i'am trying to pack it in a war file. I am trying to store configuration files into WEB-INF/data directory. In my web-service init method, I have to load the configuration file that was stored in WEB-INF/data directory. Is it possible? How can I do it? Regards