tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: CLASSPATH for web apps - and the answer is?
Date Tue, 27 Nov 2001 20:09:22 GMT
I can't claim to be up to date with the latest state
of Xerces, Xalan, and Jaxp, so there may be new issues
that I'm not aware of with respect to combinations
of Xerces, Xalan, etc.

The fundamental problem in Tomcat 3.2.x is that:

1) The web server classes, including Jasper, live on
   the CLASSPATH.

2) I believe it is Jasper that requires an XML parser,
   so an XML parser has to exist on the CLASSPATH too.

3) Because Tomcat 3.2 uses the Java 2 sequence of
   classloader searching (as does Tomcat 3.3), classes
   found on the CLASSPATH take precedence over classes
   local to the web applications.  Thus, all web
   applications are forced to use the XML parser on the
   CLASSPATH.

Jasper doesn't care which XML parser.  So you can
upgrade the Jaxp 1.0.1 version (jaxp.jar + parser.jar)
to crimson.jar (the current version has the jaxp.jar
classes included) or xerces.jar depending on your
other requirements.  However, if you have two web
applications that want different versions of XML parser,
you are stuck.

Tomcat 3.3 avoids forcing a single XML parser on all
the web applications by building a more complicated
classloader hierarchy which hides most of the server
and Jasper classes from the web applications.  A side
effect of this is that adding classes and jars is more
complicated than simply adding them to the CLASSPATH.
This is why the tomcat.sh/tomcat.bat script ignores your
CLASSPATH setting since that is all too often the
wrong place to add them.

Adding classes for Tomcat 3.3 is documented here:

<http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_classes>

If this doesn't help, please describe the error you are
seeing and how you have changed the default Tomcat 3.3
configuration.

Cheers,
Larry


> -----Original Message-----
> From: Sanjay bahal [mailto:sb6325@yahoo.com]
> Sent: Tuesday, November 27, 2001 2:35 PM
> To: Tomcat Users List
> Subject: RE: CLASSPATH for web apps - and the answer is?
> 
> 
> Larry,
> I can not even bring Tomcat 3.3 up ( not even 3.2).
> So are you saying with 3.3 could use xalan and xerces
> only- And I do not need crimson, jaxp, parser?
> Thanks a lot,
> Sanjay
> --- Larry Isaacs <Larry.Isaacs@sas.com> wrote:
> > If you are adding 2.2-D13 xalan.jar in Tomcat 3.2.3,
> > you
> > will probably need to replace the jaxp.jar and
> > parser.jar
> > with the v1.4.3 xerces.jar.  For Tomcat 3.3 you
> > could
> > update the v2.1.0 xalan.jar and replace crimson.jar
> > with xerces.jar.
> > 
> > If you can use Tomcat 3.3 instead of Tomcat 3.2.3, I
> > would recommend doing so.  There are classloading
> > issues
> > that can be addressed in 3.3, which can't in 3.2.x.
> > 
> > I could offer more help if I knew your error and
> > some
> > simple steps to reproduce your problem.
> > 
> > Cheers,
> > Larry
> > 
> > 
> > > -----Original Message-----
> > > From: Ian Bruseker
> > [mailto:ian@fullcirclesystems.com]
> > > Sent: Monday, November 26, 2001 7:52 PM
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: CLASSPATH for web apps - and the answer
> > is?
> > > 
> > > 
> > > Greetings.  I'm new to this list.  Go easy on me. 
> > :-)
> > > 
> > > Last Monday, Roland Berger posted a message to
> > this list 
> > > titled "CLASSPATH
> > > for web apps" (I found his posting in the web
> > archive at 
> > > mikal.org).  In his
> > > email he asks why Tomcat 3.2.3 is not loading up
> > log4j.jar from his
> > > WEB-INF/lib directory, and comments on how
> > un-Jakarta-like it 
> > > would be to
> > > have to hardcode a classpath for ever web app in
> > the startup 
> > > script.  I am
> > > having the same problem (the only difference is
> > the jar 
> > > Tomcat isn't loading
> > > for me is xalan.jar (from Xalan-J 2.2-D13), not
> > log4j.jar).
> > > 
> > > I've tried both 3.2.3 and 3.2.4, with slightly
> > different 
> > > error message but
> > > the same basic, bad result.  3.3 failed too, but
> > that's 
> > > probably because
> > > TOMCAT_HOME$/lib seems to have much more
> > importance and 
> > > organization now,
> > > and I just don't "get it" yet (besides, I'm not
> > really 
> > > looking to upgrade
> > > just yet).
> > > 
> > > I'm sure whatever the answer to his message was
> > will be the 
> > > same answer I
> > > require.  Unfortunately, at this moment the web
> > archive for 
> > > this list stops
> > > at November 19th (the day his message was posted),
> > so if 
> > > there were any
> > > replies to it, the archive isn't providing them
> > for me.  I 
> > > really require an
> > > answer soon (rather than waiting for the archives
> > to get 
> > > updated) so I can
> > > move on with my work.  Could someone help me out
> > here?
> > > 
> > > Thank you.
> > > 
> > > Ian.
> > > 
> > > 
> > > --
> > > To unsubscribe:  
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > For additional commands:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> > > Troubles with the list:
> > <mailto:tomcat-user-owner@jakarta.apache.org>
> > > 
> > 
> > --
> > To unsubscribe:  
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> > Troubles with the list:
> > <mailto:tomcat-user-owner@jakarta.apache.org>
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message