You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dmitri Colebatch <di...@ozemail.com.au> on 2001/06/18 23:39:40 UTC

Re: Finding the XML parser in Tomcat

Eoin Woods wrote:
> To use Xerces in our servlets, we had to add "xerces.jar" to the front of
> the CLASSPATH in the tomcat.sh script.
Alternatively rename it to _xerces.jar and put it in the
$TOMCAT_HOME/lib directory.  That way you wont have to change your
tomcat.sh

cheers
dim

> 
> Eoin.
> -----Original Message-----
> From: Frank Lawlor [mailto:frank.lawlor@athensgroup.com]
> Sent: Monday, June 18, 2001 7:20 AM
> To: Tomcat (E-mail)
> Subject: Finding the XML parser in Tomcat
> 
> In my VisualAge Java development environemnt (jdk 1.2.2) I can say, for
> example,
> 
> Parser parser =
> ParserFactory.makeParser("org.apache.xerces.parsers.SAXParser");
> 
> but when I deploy to a standalone Tomcat environment, I get a class not
> found on the parser name, even tho I put the jar in Tomcat's WEB-INF\lib
> directory.
> 
> If I put the jar into jre\lib\ext, it is found, but having to put it there
> is more imposition on the user and requires extra work beyond normal web app
> deployment (just putting the WAR file in the webapps dir).
> Further, If I put the jar there, then programs that use the no parameter
> form
>    Parser parser = ParserFactory.makeParser();
> then start to throw an error:
>   Null Pointer Exception: sax.parser is null
> This can break other applications!
> 
> Why will it not find the parser in the Tomcat WEB-INF\lib directory?
> Is this an XML, jdk, Tomcat issue or what?
> If I add the XML lib to jre\lib\ext, what/how system properties must be set?
> 
> Thanks,
> -- Frank
> 
> Frank Lawlor
> Athens Group, Inc.
> (512) 345-0600 x151
> Athens Group, an employee-owned consulting firm integrating technology
> strategy and software solutions.