The String parm is the name of the resource, ie it doesn't list resources.


-----Original Message-----
From: Jim Downing [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 6:15 PM
To: [EMAIL PROTECTED]
Subject: Re: Accessing a packaged file


I've tried both ways, and I'm still missing something.
Thread.currentThread().getContextClassLoader.getResources("") doesn't list
the resource required - do I have to list it in the web.xml descriptor?

jim

----- Original Message -----
From: "Samson, Lyndon [IT]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 5:47 PM
Subject: RE: Accessing a packaged file


> Or more succinctly;
>
> this.getClass().getResourceAsStream(String);
>
> 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