Hi, Thanks Joe, Antonio and everyone else out there for a prompt response. I had read that, struts-config.xml won't work if we change the order of sections in it. So, I was just triaging with struts-config.xml in my free time and found my application working with modified struts-config.xml, which should not happen. Though struts-config.xml is a well formed document.
Thanks/Regards, Gaurav Jain -----Original Message----- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 7:36 PM To: Gaurav Jain; 'Struts Users Mailing List' Subject: RE: Order of struts-config.xml 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-for w >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$FragmentContentDispat c >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:1 0 >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(LifecycleSuppo r >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:3 9 >) > at >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l >.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:[EMAIL PROTECTED] >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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] >> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > >-- >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: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] * 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]