DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26831>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26831

XML Parser Cassloading (again)





------- Additional Comments From [EMAIL PROTECTED]  2004-02-10 16:58 -------
Oops, sorry posted empty by mistake!

As I was saying...

I know we've been around the classloading block many times both in TC 3/4 and 5,
but I believe that the CL model in TC 5 (and probably 4 if it has been
backported) is wrong. I'm guessing that this will be set to WONTFIX but I wanted
to post this here to get an explanation.

Currently TC 5 ships a parser in common/endorsed. This is the Xerces 2.6 parser
with the parser classes (xercesImpl.jar) and the JAXP classes (xmlParserAPIs.jar).

The Servlet 2.4 specification reads "The Web application class loader must load
classes from the WEB-INF/classes directory first, and then from library JARs in
the WEB-INF/lib directory."

However if I put xercesImpl.jar in web-inf/lib this is *not* loaded the
xercesImpl.jar from common/endorsed is loaded.

As I understand the specifications the endorsed classes form a limited set. As
for the XML classes the org.w3 package and the org.xml.sax are endorsed. However
the org.apache.* classes are not endorsed. This implies that *only* the
xmlParserAPIs.jar file should be in common/endorsed as only this contains
packages that should be endorsed. You can then move xercesImpl.jar to
common/lib, which means that you can then use the JAXP specification to allow
the WEB-INF/lib to override the XML parser in common lib.

BTW, doing this in 5.0.18 *doesn't  * work. The XML parser is loaded and Tomcat
runs fine. But if I put xercesImpl in common/lib and web-inf/lib the one from
common/lib is loaded, so that aspect would also need to be fixed.

Could someone tell me if my reasoning is correct or not, as I said this is based
on my reading of the specifications and my understanding of how JAXP and the
servlet specifications (2.4) should work.

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to