Hi Boris,

This doesn't work for me -> i would like to share classes between
webapps in order for them to have a common classloader. In this way i
can pass object references between two webapps. In tomcat there is no
concept of EAR packaging, and EAR classloading isolation in general. I
don't agree that sharing classes doesn't pose many advantages as
compared to not sharing them - that's why there is the big topic named
"Jar Hell".

Regards,
Angel

On 2/20/07, Boris Unckel <[EMAIL PROTECTED]> wrote:
Hello,

Angel Todorov wrote:
> I have the following scenario: one webapp, which has some jars in its
> private WEB-INF\lib dir, and one common jar which I would like to
> share among several webapps. Hence, I am putting this jar into the
> shared\lib directory of Tomcat. The problem is that this common lib
> references classes which are in jars in the first webapp's WEB\lib
> directory. Therefore, I get NoClassDefFoundErrors when this common jar
> loads and tries to refer classes from the webapp's private lib.
>
> Is it possible to achieve a workaround with tomcat's classloading for
> that custom scenario?
there is no workaround, but a better strategy and best practise:
Put *all* JARs of a webapp into WEB-INF/lib, if there is not
a strong usecase or technical reason to do otherwise (i.E. some JDBC drivers
should be put into common/lib or shared/lib).

Sharing classes causes definitly more problems than it solves.

Regards
Boris


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to