Message
hi;
I
don't know much about jboss, but in web sphere you can choose the class loading
scheme to load from the war first.
try to
put all your 3rd party jars in the web-inf/lib so your war is portable and self
contained. in this case, the only time you will go to the system classpath is
for loading the App Server runtime classes (there probably is a websphere.jar
some where which is the J2EE implementation of IBM).
remember that even though you can configure the App
server to load from the war first, I cannot recommend this because it might be
not portable. its better to package your application in a way that relies on the
standard class loading scheme to make your application more
portable.
thanks.
Thank you for your replies.Yes Katz, you are
right on the class loading pattern, as the xerces classes are loaded from
the system lib and not from the war lib and hence the parser object is not
able to find or load the classes in the war. But If we change the sequence
of class loading i.e. it should first pick up from the war and so ,
will it affect the visibility of common utility classes which are packed
and placed outside the war file, in an ear.
I will try changing the sequence, and let you
know the outcome.
Just FYI, I am using WebSphere 5 and JBOSS 3.x as
the app servers.
Thanks & Regards,
Vikram Naik
----- Original Message -----
Sent: Sunday, July 27, 2003 9:02
AM
Subject: Re: Class Loading in Web
Tier
actually;
the default of class lodaing is to get the jars
from the 'father class loader' which is simply the system classpath. so at
most time putting the jars in the web-inf/lib directory would not
help.
most App Servers admionistration tools let you
choose the class loading scheme of your choice so you can specifically ask
the container to load the jars from the WAR file first.
Include the Xereces API jar in the WAR itself.
Hello,
How do we make it sure that a class
loaded in a web-application is picked up from the war, and not from
the web servers lib. Do we have any configurable property in web-servers
or appservers to do so.
The problem I am facing is... We are using
Xerces API to do some xml parsing, but the parser is not able to find
the class which it has to load from the war, say the DocumentClass which
extends the DocumentImpl class of xerces. Have anyone faced such a
problem with xerces.
Please comment.
Regards,
Vikram
Naik