Or more succinctly;

this.getClass().getResourceAsStream(String);





-----Original Message-----
From: Filip Hanik [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 5:28 PM
To: [EMAIL PROTECTED]
Subject: RE: Accessing a packaged file


Thread.currentThread().getContextClassLoader().getResourceAsStream

picks up files in your WEB-INF/classes or WEB-INF/lib inside of a jar or zip
Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

> -----Original Message-----
> From: Jim Downing [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 9:09 AM
> To: [EMAIL PROTECTED]
> Subject: Accessing a packaged file
>
>
> Hi,
> I'm trying to get a servlet to access a text file that has been packaged
> with the servlet in a .war file. Is it possible to access the file without
> knowing it's absolute path when deployed, and if so how?
>
> jim
>
>

Reply via email to