tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Reilly <>
Subject Re: How do you get Tomcat 4.x to use the same classloader for a web-app's servlets and JSP's?
Date Fri, 16 Jan 2004 04:04:44 GMT

> but why do you need the JSPs and servlets class loader to be the same,
> just use a shared util class (web-inf/classes or lib), load the resource
> bundles through that one
> one level down, that way the classloader is the same

I have some properties files located under web-inf/classes.

the ant script I am using puts them in there, along with class files.

So when I use 

ResourceBundle msg = ResourceBundler.getBundle(""), 

it uses the class loader to obtain the actual resource. 

So, if they are different class loaders, you can't use that mechanism.

Even so, I don't want Tomcat to be running the servlet init method twice like 
it currently does.

That just seems like a waste of resources.

When I add <load-on-startup>1</load-on-startup> to web.xml, it runs it twice.

That is the behaviour I also want to stop.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message