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 directory. Is it possible? How can I
> do it?
>
I'm not 100% sure if you can but
I access files in a separate "files" directory in my webapp, it may work for
you with slight
modification.
ServletContext sc = getServletContext();
String path = sc.getRealPath("/files");
path += "/" + filename;
File f = new File(path);
if(f.exists())
{
// do something
}
else
{
out.println("no file");
}
-Steve O.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]