Hi,

I had to browse the code again. It turns out version 2.2 of tapestry
(ApplicationServlet) does not use
Thread.currentThread().getContextClassLoader(), but rather
getClass().getResourceAsStream("..").

I'm not sure why the latter approach fails, but it does. I believe the
current version of ApplicationServlet and DefaultResourceResolver should be
up-to-date, but I don't have cvs up and running on my workstation yet so I
can't test it yet. 

Maybe a new micro release is justified soon?

- Henning

btw: Tapestry is cool! thanks for making it open source :)

-----Original Message-----
From: Mind Bridge [mailto:mindbridgeweb@;yahoo.com]
Sent: 8. november 2002 22:54
To: Storhaug, Henning; [EMAIL PROTECTED]
Subject: Re: [Tapestry-developer] resource loading problem


Hi Henning, 
Could it be that the ContextClassLoader is not properly set by the servlet
container for some reason? I have encountered a similar problem with some
older versions of Tomcat. Could you check? 
-mb 

 "Storhaug, Henning" <[EMAIL PROTECTED]> wrote: 
> I'm having problems loading resources from WEB-INF/classes 
> using JBoss 3.0.4 w/integrated Jetty. I have placed my application file as
follows:
> "WEB-INF/classes/intraweb/Intraweb.application".

I've done some research, and found something strange:
If I bundled my war inside an ear, I was able to load the resource using the
following lines of code:

ClassLoader cl = Thread.currentThread().getContextClassLoader();
java.net.URL resource =
cl.getResource("intraweb/Intraweb.application");

Effectively the same code is used in DefaultResourceResolver.getResource(),
but the ApplicationServlet is _not_ able to load the resource. 

Do you have any suggestions what may cause this behaviour?





-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer




Do you Yahoo!?
U2 on LAUNCH - Exclusive medley & videos from Greatest Hits CD


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to