Hi, I'm having classloader problems with Tomcat (3.3.1/4.0.1/4.0.3). The thing is, I'm trying to use the same classes (jars) in two webapps, but it seems like the classloaders get mixed up.
>From what I know about class loading in Tomcat (and servlet engines in general), a separate classloader should be created for each webapp, and it should be completely isolated from the classloaders of other webapps. This should make it possible to have two webapps with the same codebase, but running separately, for example, using different values for static members etc. Now, when I try to do this with webapp A and webapp B, all requests to webapp B are run with the objects from webapp A! (I use A and B to indicate the startup order of the servlets) It's not just that static members get mixed up, but it seems like webapp B does not create a new servlet instance, but uses the same servlet object as A... that would make sense if the request was coming to the same webapp, since the servlet engine is not allowed to create many instances of a servlet, but it should create new instances for separate webapps, since the classloaders are separate, right? I've tried trivial stuff like using different names in web.xml but no luck so far. Has anyone else seen this behavior? Am I misunderstanding something, or isn't this incorrect? If I'm wrong in my diagnosis, any ideas of what I might be doing wrong in my serlvet? Regards, Gummi Haf ------------------------------------------ Gudmundur Hafsteinsson - [EMAIL PROTECTED] Dimon Software - www.dimonsoftware.com "... 'cause that's what tiggers do the best!" - Tigger ------------------------------------------ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>