On Tue, 24 Apr 2001, Milt Epstein wrote:
On Mon, 23 Apr 2001, Filip Hanik wrote:
In this case, the class and the resource were packaged together:
that should mean you could use the same class-loader for both, no?
(Assuming, of course, the user didn't monkey around with your
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
Undeliverable mail.
Undeliverable mail.
Undeliverable mail.
and the ServletContext ones?
Thanks.
-Original Message-
From: William Kaufman [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 10:46 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Accessing a packaged file
Or more succinctly;
this.getClass().getResourceAsStream
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
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
On Mon, 23 Apr 2001, Filip Hanik wrote:
Thread.currentThread().getContextClassLoader().getResourceAsStream
picks up files in your WEB-INF/classes or WEB-INF/lib inside of a jar or zip
[ ... ]
I have seen this this construct mentioned a few times here:
in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net
-Original Message-
From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 9:47 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Accessing a packaged file
-Original Message-
From
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
you want to take a look at the
getServletContext().getResource*
methods. These methods are implemented by the Servlet Container to allow
the servlet to access resources where ever they happend to be.. either
in a file, in a WAR file, in a database, however the container wants to
maintain
: Filip Hanik [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, April 23, 2001 6:13 PM
Subject: RE: Accessing a packaged file
Or more succinctly;
this.getClass().getResourceAsStream(String);
nope, this is not a good approach at all!
if the class this is loaded
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 10:15 AM
To: [EMAIL PROTECTED]
Subject: Re: Accessing a packaged file
I've tried both ways, and I'm
,...)
-- Bill K.
-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 10:13 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Accessing a packaged file
Or more succinctly;
this.getClass().getResourceAsStream(String);
nope
-
From: William Kaufman [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 10:46 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Accessing a packaged file
Or more succinctly;
this.getClass().getResourceAsStream(String);
Or, more succinctly,
getClass().getResourceAsStream(String
16 matches
Mail list logo