In the end, I've resorted to using my own static factories to look up and instantiate JAXP implementation. From there on out, the JAXP APIs are fairly nice and easy to use, so the result is having only a single non-standard line of code per XML or XSLT factory.
-- Jess Holle
Shapira, Yoav wrote:
Hola,
I must say I don't fully understand the above. So what exactly willbug
happen if the common/endorsed directory is removed? What will stop
working and on which platform(s)? Are there any specific pointers to
ids or discussions, that would explain why the endorsed directory waswas
added in the first place? I know configuring the XML parser and JAXP
always pain, but I don't know what specifically was the problem. Any
insights you can bring into this will be appreciated.
JDK 1.4 was the first one to include JAXP and an XML parser implementation (Crimson) in the JDK itself. This presented difficulties to all container writers, including Tomcat, because they had to jump through special hoops to allow user web applications to override the parser and JAXP interfaces that shipped with the JDK.
The typical use-case is a user wishing to use Xerces version X, which provides new features not available in Crimson and not accessible via the JAXP APIs, but relying on new DOM or SAX classes. The user needs both the xml-apis.jar and the xercesImpl.jar from his WAR file to be loaded, overriding those in the JDK itself (old JAXP and old Crimson parser).
The endorsed classloading mechanism is the approach suggested by Sun and adopted by Tomcat. "Endorsed" means that classes from that repository can override those classes with the same name that ship with the JDK. The XML parsers are the classic example, but there are others.
Our classloader how-to (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html ) and Sun's documentation on the mechanism in general (http://java.sun.com/j2se/1.4.2/docs/guide/standards/) contain additional explanations.
Yoav Shapira
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]