It's not a Struts issue, just conflicts between parser versions.
The configuration mentioned is a documentated alternative for Tomcat.
Many applications need Xerces available this way.
Kevin Jones wrote:
>
> OK I'll try it, but is this a bug in Struts?
>
> I don't really want to, nor should I have to, change the 'standard' Tomcat
> install.
>
> BTW, I have no global classpath, and there's *no way* I'm putting Xerces in
> lib/ext folder!
>
> Kevin Jones
> Developmentor
> www.develop.com
>
> > -----Original Message-----
> > From: Ted Husted [mailto:[EMAIL PROTECTED]]
> > Sent: 23 September 2001 14:27
> > To: [EMAIL PROTECTED]
> > Subject: Re: Struts and XML
> >
> >
> > Try it with xerces in the Tomcat commons/lib folder, and nohting extra
> > in the WEB-INF/lib.
> >
> > Be sure other parsers, or copies of Xerces, is being made avaiable
> > through the CLASSPATH or the lib/ext folder under JAVA_HOME.
> >
> > -- Ted Husted, Husted dot Com, Fairport NY USA.
> > -- Custom Software ~ Technical Services.
> > -- Tel +1 716 737-3463
> > -- http://www.husted.com/about/struts/
> >
> >
> > Kevin Jones wrote:
> > >
> > > I've just downloaded struts (the binary version) and am trying
> > to get the
> > > struts-example to run. After reading the install guide my
> > understanding is
> > > that struts should work with any XML parser. If I run the example with
> > > jaxp.jar and crimson.jar in WEB-INF/lib it loads OK. But, if I
> > replace those
> > > jars with xerces.jar (verison 1.4.1) I get the following exception.
> > >
> > > This is TC4 release BTW
> > >
> > > It seems like there is a dependency on crimson (judging by the
> > class name).
> > > Does the binary version only work with crimson or is there a
> > config option
> > > somewhere?
> > >
> > > java.lang.ClassCastException:
> > org.apache.crimson.jaxp.SAXParserFactoryImpl
> > > at
> > >
> > javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:155)
> > > at
> > org.apache.struts.digester.Digester.getParser(Digester.java:275)
> > > at org.apache.struts.digester.Digester.parse(Digester.java:755)
> > > at
> > >
> > org.apache.struts.action.ActionServlet.initMapping(ActionServlet.j
> > ava:1331)
> > > at
> > > org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
> > > at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> > > at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
> > > at
> > org.apache.catalina.core.StandardContext.loadOnStartup(Unknown
> > > Source)
> > > at
> > org.apache.catalina.core.StandardContext.start(Unknown Source)
> > > at
> > org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
> > > at
> > org.apache.catalina.core.StandardHost.addChild(Unknown Source)
> > > at org.apache.catalina.core.StandardHost.install(Unknown Source)
> > > at
> > org.apache.catalina.startup.HostConfig.deployApps(Unknown Source)
> > > at org.apache.catalina.startup.HostConfig.start(Unknown Source)
> > > at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown
> > > Source)
> > > at
> > >
> > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unkno
> > wn Source)
> > > at org.apache.catalina.core.ContainerBase.start(Unknown Source)
> > > at org.apache.catalina.core.ContainerBase.start(Unknown Source)
> > > at org.apache.catalina.core.StandardEngine.start(Unknown Source)
> > > at
> > org.apache.catalina.core.StandardService.start(Unknown Source)
> > > at org.apache.catalina.core.StandardServer.start(Unknown Source)
> > > at org.apache.catalina.startup.Catalina.start(Unknown Source)
> > > at org.apache.catalina.startup.Catalina.execute(Unknown Source)
> > > at org.apache.catalina.startup.Catalina.process(Unknown Source)
> > > at java.lang.reflect.Method.invoke(Native Method)
> > > at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
> > >
> > > Kevin Jones
> > > Developmentor
> > > www.develop.com