tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Reilly <m.rei...@its.uq.edu.au>
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
Filip,

> 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("util.Messages.properties"), 

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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message