The class resolution sequence of WEB-INF/lib jars is not specified in
the servlet spec. One would expect it to be in the sequence given by the
call on the servlet context:

  context.getResourcePaths("/WEB-INF/lib/");

but that is not guaranteed.

If it is necessary to discriminate between class versions, place a
different class static version field in each class and check that
field's value. In general, dependency on which version of a class is
loaded spells trouble.

Fred Loney
Spirited Software, Inc.
www.spiritedsw.com

----- Original Message -----
From: "Ashwani Kalra" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 4:07 AM
Subject: same class in two different jar file in web-inf/lib dir


> Hi,
>
> I have two different jar files say a.jar and b.jar  in the WEB-INF/lib
dir.
> There is one common( same package) file which is present in both the
> jars. I am accessing this class from say servlet. Then which of the
jar file
> will be used for this class. Basically I want to know the sequence in
which
> these jar file will be placed in the classpath?
>
> TIA
> Ashwani
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Thanks
> Ashwani Kalra
> http://www.geocities.com/ashwani_kalra/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
========================================================================
===
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email
to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to