struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject RE: Order of struts-config.xml
Date Mon, 27 Mar 2006 14:06:05 GMT
At 6:31 PM +0530 3/27/06, Gaurav Jain wrote:
>Yes. Each and every action is working, but I am experiencing this error in
>Tomcat console.

This is because your XML is no longer valid according to the DTD.

This is not a fatal error in Struts, but why would you choose to 
change the order of elements in the struts-config.xml?

This is not fatal because the Digester rules which consume the 
struts-config.xml are not as rigorous as the DTD.  They tolerate the 
elements in any order.

You will get the SAXParseException as long as your document does not 
conform to the DTD.

Joe


>ERROR [main] org.apache.commons.digester.Digester error- Parse Error at line
>43 column 17: The
>content of element type "struts-config" must match
>"(display-name?,description?,data-sources?,f
>orm-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,
>message-resources*,
>plug-in*)".
>org.xml.sax.SAXParseException: The content of element type "struts-config"
>must match "(display
>-name?,description?,data-sources?,form-beans?,global-exceptions?,global-forw
>ards?,action-mappin
>gs?,controller?,message-resources*,plug-in*)".
>         at
>org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
>Source)
>         at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>Source)
>         at
>org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
>         at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
>Source)
>         at
>org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
>Source)
>         at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
>her.disp
>atch(Unknown Source)
>         at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>Source)
>         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>Source)
>         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>Source)
>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>         at org.apache.commons.digester.Digester.parse(Digester.java:1572)
>         at
>org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.j
>ava:738)
>
>         at
>org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:6
>87)
>         at
>org.apache.struts.action.ActionServlet.init(ActionServlet.java:333)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:211)
>         at
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
>29)
>         at
>org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
>         at
>org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
>4013)
>         at
>org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
>         at
>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
>23)
>         at
>org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>         at
>org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
>         at
>org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
>ava:277)
>
>         at
>org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
>         at
>org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625)
>         at
>org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
>         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
>         at
>org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
>         at
>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
>t.java:1
>19)
>         at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
>         at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
>         at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>         at
>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
>         at
>org.apache.catalina.core.StandardService.start(StandardService.java:480)
>         at
>org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>)
>         at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>.java:25
>)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
>
>-----Original Message-----
>From: Dion Gillard [mailto:dion.gillard@gmail.com]
>Sent: Monday, March 27, 2006 6:26 PM
>To: Struts Users Mailing List
>Subject: Re: Order of struts-config.xml
>
>Do the struts actions work?
>
>On 3/27/06, Gaurav Jain <gaurav.jain@infobeans.com> wrote:
>>
>>  I am experiencing Parse Error in my Tomcat for changed order of
>>  struts-config.xml. But my application is working fine.
>>  Its strange.
>>
>>
>>  Regards,
>>  Gaurav
>>
>>  -----Original Message-----
>>  From: Dion Gillard [mailto:dion.gillard@gmail.com]
>>  Sent: Monday, March 27, 2006 6:14 PM
>>  To: Struts Users Mailing List
>>  Subject: Re: Order of struts-config.xml
>>
>>  On 3/27/06, Gaurav Jain <gaurav.jain@infobeans.com> wrote:
>>  >
>>  > Hi,
>>  >
>>  > The struts-config.xml file contains following sections:-
>>  >
>>  >
>>  >
>>  > 1. Form bean definition section
>>  >
>>  > 2. Global forward definition section
>>  >
>>  > 3. Action mapping definition section
>>  >
>>  > 4. Controller configuration section
>>  >
>>  > 5. Application Resources definition section
>>  >
>>  >
>>  >
>>  > What if we change the order of these sections?
>>
>>
>>  The action servlet should fail to load up.
>>
>>  What effect it'll have on my application?
>>
>>
>>  It will be unavailable.
>>
>>  Will it work?
>>
>>
>>  No.
>>
>>  Gaurav Jain
>>  >
>>  >
>>  >
>>  >
>>  >
>>  >
>>  >
>>
>>
>>  --
>>  http://www.multitask.com.au/people/dion/
>>  Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
>>  of the dark, but because the dark is afraid of Chuck Norris
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>  For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
>--
>http://www.multitask.com.au/people/dion/
>Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
>of the dark, but because the dark is afraid of Chuck Norris
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org


-- 
Joe Germuska
Joe@Germuska.com * http://blog.germuska.com    

"You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed.  Try something new."
	-- Robert Moog

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message