tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Voytenko, Dimitry" <>
Subject class-loading and java.endorsed.dirs
Date Fri, 21 Feb 2003 05:29:48 GMT

Here's what happend. It looks pretty strange. I couldn't find explanation to
this neither in Tomcat docs, Servlet specs or Mailing List.

I have a servlet, with doGet implemented as:

	System.err.println("XALAN VERSION = " +

In the application's WEB_INF/lib directory I have xalan.jar of version
2.4.1, which I thought should have been used. But instead, as the result of
execution of the servlet, I got

	XALAN VERSION = Xalan Java 2.2 D11

This is the Xalan version included to JDK 1.4.

Isn't application's JAR should be used (as stated in SRV.9.7.2 of the
Servlet 2.3 specification)?

Then, I changed "setclasspath.bat" JAVA_ENDORSED_DIRS env. variable to
include my WEB_INF/lib directory (application wasn't packed into WAR). This
variable is then passed as the value of "java.endorsed.dirs" java startup
parameter. As the result, I got

	XALAN VERSION = Xalan Java 2.4.1

which I expected in the first place.

Does this mean that libraries in the endorsed dir have bigger priority? It's
a little confusing why this change whould make such a difference. Is there a
way to specify forcefully that application should only use local libraries
if they're specified?

Dimitry E Voytenko

Sector Data, LLC, is not affiliated with Sector, Inc., or SIAC

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message