jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomohiro Matsuzaki" <t-matsuz...@se.daitec.co.jp>
Subject Re: web.xml parse error
Date Sat, 04 Sep 2004 01:04:06 GMT
Hi, Vincent,

I've done that. Key of the issue is CACTUS-141.

Thanks for your help.

Tomohiro

----- Original Message ----- 
From: "Vincent Massol" <vmassol@pivolis.com>
To: "'Cactus Users List'" <cactus-user@jakarta.apache.org>
Sent: Friday, September 03, 2004 5:01 PM
Subject: RE: web.xml parse error


> Hi Tomohiro,
>
> Yes, you're right, it's a bug (but it should still work fine). It's
because
> the context-param is merged at the end of the file whereas it should
located
> at the top. Do you think you could open a JIRA issue for this so that we
> don't forget to fix it?
>
> Thanks a lot
> -Vincent
>
> > -----Original Message-----
> > From: Tomohiro Matsuzaki [mailto:t-matsuzaki@se.daitec.co.jp]
> > Sent: vendredi 3 septembre 2004 06:49
> > To: cactus-user@jakarta.apache.org
> > Subject: web.xml parse error
> >
> > Hi, all.
> >
> > I am trying the sample in jakarta-cactus-13-1.6.1/samples/servlet
> > against JBoss 3.2.2.
> > All test case is done with no errors.
> > But I got following error in
> > samples/servlet/target/test-reports/jboss3x.out:
> >
> > 13:11:01,418 ERROR [Digester] Parse Error at line 81 column 11: The
> > content
> > of element type "web-app" must match
> > "(icon?,display-name?,description?,distributable?,context-
> > param*,filter*,fil
> > ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-
> > mappin
> > g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-
> > ref*,se
> > curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-
> > loca
> > l-ref*)".
> > org.xml.sax.SAXParseException: The content of element type "web-app"
must
> > match
> > "(icon?,display-name?,description?,distributable?,context-
> > param*,filter*,fil
> > ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-
> > mappin
> > g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-
> > ref*,se
> > curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-
> > loca
> > l-ref*)".
> >  at
> >
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHa
> > nd
> > lerWrapper.java:232)
> >  at
> >
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:
> > 17
> > 3)
> >  at
> >
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:
> > 36
> > 2)
> >  at
> >
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:
> > 29
> > 6)
> >  at
> >
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidato
> > r.
> > java:2959)
> >  at
> >
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java
> > :9
> > 18)
> >  at
> >
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XML
> > Do
> > cumentFragmentScannerImpl.java:1145)
> >  at
> >
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDo
> > cu
> > mentFragmentScannerImpl.java:988)
> >  at
> >
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispa
> > tc
> > her.dispatch(XMLDocumentFragmentScannerImpl.java:1446)
> >  at
> >
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocu
> > me
> > ntFragmentScannerImpl.java:333)
> >  at
> >
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParser
> > Co
> > nfiguration.java:529)
> >  at
> >
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParser
> > Co
> > nfiguration.java:585)
> >  at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
> >  at
> >
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1
> > 14
> > 8)
> >  at org.apache.commons.digester.Digester.parse(Digester.java:1548)
> >  at
> >
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.
> > ja
> > va:282)
> >  at
> > org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
> >  at
> >
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.jav
> > a:
> > 243)
> >  at
> >
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupp
> > or
> > t.java:166)
> >  at
> >
org.apache.catalina.core.StandardContext.start(StandardContext.java:3568)
> >  at
> >
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
> > :8
> > 21)
> >  at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
> >  at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
> >  at
> >
org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTo
> > mc
> > atService.java:530)
> >  at
> >
org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomca
> > tS
> > ervice.java:309)
> >  at
> > org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)
> >  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
> >  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
> >  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
> >  at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
> >  at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> > pl
> > .java:25)
> >  at java.lang.reflect.Method.invoke(Method.java:324)
> >  at
> >
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDisp
> > at
> > cher.java:284)
> >  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
> >  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
> >  at $Proxy6.deploy(Unknown Source)
> >  at
> >
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScan
> > ne
> > r.java:302)
> >  at
> >
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanne
> > r.
> > java:476)
> >  at
> >
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doSca
> > n(
> > AbstractDeploymentScanner.java:201)
> >  at
> >
org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(Abstra
> > ct
> > DeploymentScanner.java:274)
> >  at
> > org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
> >  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> >  at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> > pl
> > .java:25)
> >  at java.lang.reflect.Method.invoke(Method.java:324)
> >  at
> >
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDisp
> > at
> > cher.java:284)
> >  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
> >  at
> >
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.j
> > av
> > a:976)
> >  at $Proxy0.start(Unknown Source)
> >  at org.jboss.system.ServiceController.start(ServiceController.java:394)
> >  at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
> >  at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> > pl
> > .java:25)
> >  at java.lang.reflect.Method.invoke(Method.java:324)
> >  at
> >
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDisp
> > at
> > cher.java:284)
> >  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
> >  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
> >  at $Proxy4.start(Unknown Source)
> >  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
> >  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
> >  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
> >  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
> >  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
> >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >  at
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39
> > )
> >  at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> > pl
> > .java:25)
> >  at java.lang.reflect.Method.invoke(Method.java:324)
> >  at
> >
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDisp
> > at
> > cher.java:284)
> >  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
> >  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
> >  at $Proxy5.deploy(Unknown Source)
> >  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
> >  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
> >  at org.jboss.Main.boot(Main.java:150)
> >  at org.jboss.Main$1.run(Main.java:395)
> >  at java.lang.Thread.run(Thread.java:534)
> >
> >
> >
> > web.xml in cactus-sample-servlet-cactified.war is like this:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> > 2.3//EN"
> >                          "http://java.sun.com/dtd/web-app_2_3.dtd">
> > <web-app>
> >     <filter>
> >         <filter-name>FilterRedirector</filter-name>
> >
> >
<filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
> >     </filter>
> >     <filter-mapping>
> >         <filter-name>FilterRedirector</filter-name>
> >         <url-pattern>/test/filterRedirector.jsp</url-pattern>
> >     </filter-mapping>
> >     <servlet>
> >         <servlet-name>ServletRedirector</servlet-name>
> >
> > <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-
> > class
> > >
> >         <init-param>
> >             <param-name>param1</param-name>
> >             <param-value>value1 used for testing</param-value>
> >         </init-param>
> >     </servlet>
> >     <servlet>
> >         <servlet-name>ServletRedirectorSecure</servlet-name>
> >
> > <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-
> > class
> > >
> >     </servlet>
> >     <servlet>
> >         <servlet-name>JspRedirector</servlet-name>
> >         <jsp-file>/jspRedirector.jsp</jsp-file>
> >         <init-param>
> >             <param-name>param1</param-name>
> >             <param-value>value1 used for testing</param-value>
> >         </init-param>
> >     </servlet>
> >     <servlet>
> >         <servlet-name>ServletRedirector_TestOverride</servlet-name>
> >
> > <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-
> > class
> > >
> >         <init-param>
> >             <param-name>param2</param-name>
> >             <param-value>value2 used for testing</param-value>
> >         </init-param>
> >     </servlet>
> >     <servlet>
> >         <servlet-name>TestJsp</servlet-name>
> >         <jsp-file>/test/test.jsp</jsp-file>
> >     </servlet>
> >     <servlet-mapping>
> >         <servlet-name>ServletRedirector</servlet-name>
> >         <url-pattern>/ServletRedirector</url-pattern>
> >     </servlet-mapping>
> >     <servlet-mapping>
> >         <servlet-name>ServletRedirectorSecure</servlet-name>
> >         <url-pattern>/ServletRedirectorSecure</url-pattern>
> >     </servlet-mapping>
> >     <servlet-mapping>
> >         <servlet-name>JspRedirector</servlet-name>
> >         <url-pattern>/JspRedirector</url-pattern>
> >     </servlet-mapping>
> >     <servlet-mapping>
> >         <servlet-name>ServletRedirector_TestOverride</servlet-name>
> >         <url-pattern>/ServletRedirectorOverride</url-pattern>
> >     </servlet-mapping>
> >     <security-constraint>
> >         <web-resource-collection>
> >             <web-resource-name>Cactus Test
Redirector</web-resource-name>
> >             <url-pattern>/ServletRedirectorSecure</url-pattern>
> >         </web-resource-collection>
> >         <auth-constraint>
> >             <role-name>test</role-name>
> >         </auth-constraint>
> >     </security-constraint>
> >     <login-config>
> >         <auth-method>BASIC</auth-method>
> >         <realm-name>myrealm</realm-name>
> >     </login-config>
> >     <security-role>
> >         <role-name>test</role-name>
> >     </security-role>
> >     <context-param>
> >         <param-name>param</param-name>
> >         <param-value>value used for testing</param-value>
> >     </context-param>
> > </web-app>
> >
> > Did I miss something?
> > Thank you.
> >
> > Tomohiro
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>


Mime
View raw message