You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stuart Clement <st...@harvestroad.com.au> on 2001/08/22 16:16:30 UTC

Overriding jar files in /tomcat/lib

Hi all,

I'm running Tomcat 3.2.1 on Suse Linux 7.0 with JDK 1.3. I have an application
that runs with xalan-j_2_0_1 and Xerces-J-1.4.0 which support namespaces, and
the only way I can get tomcat to pick them up seems to be by removing jaxp.jar
and parser.jar and putting the new xalan and xerces jar files (as well as the
xalanj1compat.jar) in the /tomcat/lib/.. directory in their place.

I have tried putting them in my applications /lib directory as per the spec, but
tomcat only seems to pick up the other jars (jdbc drivers etc...) and I always
get an exception from tomcat saying that namespaces are not supported etc...

I have also tried adding them to my custom worker.properties file classpath
_before_ the standard includes, but that has not brought success either.

Am I missing something simple here, or is there an elegant way to do this?

cheers

Stu


Re: Overriding jar files in /tomcat/lib

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 22 Aug 2001, Stuart Clement wrote:

> Hi all,
>
> I'm running Tomcat 3.2.1 on Suse Linux 7.0 with JDK 1.3. I have an
> application that runs with xalan-j_2_0_1 and Xerces-J-1.4.0 which
> support namespaces, and the only way I can get tomcat to pick them up
> seems to be by removing jaxp.jar and parser.jar and putting the new
> xalan and xerces jar files (as well as the xalanj1compat.jar) in the
> /tomcat/lib/.. directory in their place.
>
> I have tried putting them in my applications /lib directory as per the
> spec, but tomcat only seems to pick up the other jars (jdbc drivers
> etc...) and I always get an exception from tomcat saying that
> namespaces are not supported etc...
>
> I have also tried adding them to my custom worker.properties file classpath
> _before_ the standard includes, but that has not brought success either.
>
> Am I missing something simple here, or is there an elegant way to do this?
>
> cheers
>
> Stu
>
>

Tomcat 3.2.x requires an XML parser to do its own processing (such as
reading web.xml files), placed in $TOMCAT_HOME/lib.  Because of the way it
is architected, this parser is also available to all web apps -- but it
*cannot* be overridden by a parser in /WEB-INF/lib of a web app.

Tomcat 4.0 lets you deal with this, because it separates the logic Tomcat
uses to parse XML documents into a separate class loader.  Apps can use
whatever class loader they want.

Craig