tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QM <qm...@brandxdev.net>
Subject Re: missing resource bundle shouldn't be
Date Tue, 07 Sep 2004 01:07:05 GMT
On Mon, Sep 06, 2004 at 02:55:13PM -0700, Garret Wilson wrote:
: I'll try that---it wouldn't cache a jar, would it?

Maybe, maybe not.  I see from your first message that you're running
Tomcat 5.5, which is technically in alpha state.  If you're trying it
out to report issues to the developers, great; but if you're simply
trying out a v5.x release, 5.0.x is considered stable.

Furthermore, I see you're running JDK 1.5.  Has anything changed there
w/r/t ResourceBundles and I18N?  Doubtful, but worth a look.

I know my apps running under Tomcat 5.0.28 / JDK 1.4.x don't have this
problem.  The servlets -- techically, Struts Action classes -- load
ResourceBundles and other objects out of WEB-INF/classes without a
problem.


: I was planning on using the same set of libraries for multiple web 
: apps---the jar in question had more than just servlets for a single web app.

There's no need to do this, really.  Webapps are supposed to be
self-contained.  My inner C++ developer says I should share common code,
similar to shared libraries; but C and C++ != Java. =)  I tend to leave
common/lib/ alone, so only the Tomcat-provided JARs exist there.


: Surely the web container doesn't use a different classloader for 
: container-generated servlets and user-created servlets in the same 
: context---does it? (And if it does, where should I put my resource 
: bundles so that the user-created servlets can access them?)

Don't quote me on this, but IIRC there is a separate classloader for
compiled JSPs to help with GC due to the fact that a classloader can't
be GC'd until all classes it owns have been GC'd. Remember, though,
Tomcat (and other containers) stack certain classloaders for a
Chain-of-Responsibility pattern effect.

Really, I'm at a loss for why it wouldn't work for you, outside of the
fact that you're using Tomcat 5.5 and JDK 1.5.


As a quick test, what about loading *any* data out of the class?  Does a
raw getResourceAsStream() work for you, for the sake of testing?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message