Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: Class Loading in Web Tier

Vikram Naik

2003-07-28

Replies:

Message
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 -----
From: Katz Guy
To: J2EE-INTEREST@JAVA.SUN.COM
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.
-----Original Message-----
From: Rathinavelu, Senthilkumar [mailto:RathinaveluS@DNB.COM]
Sent: Friday, July 25, 2003 7:38 PM
To: J2EE-INTEREST@JAVA.SUN.COM
Subject: Re: Class Loading in Web Tier

Include the Xereces API jar in the WAR itself.
-----Original Message-----
From: Vikram Naik [mailto:deadly_naik@HOTMAIL.COM]
Sent: Friday, July 25, 2003 12:35 PM
To: J2EE-INTEREST@JAVA.SUN.COM
Subject: Class Loading in Web Tier

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
©2008 junlu.com - Jax Systems, LLC, U.S.A.