no, there is no easy way to do this. you can only have one version of a library opened at a time within a classloader. Since each webapp has its own classloader, you can put all servlets requiring library.jar 1.0 into one context and the others into another context. But then any other jars in /WEB-INF/lib will need to be copied into both contexts or you will have to put them in /common/lib to share them between contexts.
Charlie > -----Original Message----- > From: Matt Zimmerman [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 5:03 PM > To: [EMAIL PROTECTED] > Subject: Sharing multiple versions of jars > > > [resending because apparently my subscribption request didn't > go through, > and posts are not accepted from non-subscribers] > > In my environment, I need to support using different versions > of certain > JARs with different webapps. For example, servlet #1, #2 and > #4 require > library.jar version 1.0, while #3, #5 and #6 require > library.jar version > 1.1. > > For various reasons, I want these jars to be loaded just > once, and shared > between all servlets which require them. The current > classloader hierarchy > does not seem to support this in a straightforward way. Is there a > mechanism for this that I have missed, or is it something > that I would need > to implement using a custom loader (or several)? > > -- > - mdz > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
