wood burning stoves*
The moose likes Struts and the fly likes Struts war deploy problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts war deploy problem" Watch "Struts war deploy problem" New topic
Author

Struts war deploy problem

shailesh kumar
Ranch Hand

Joined: Jul 18, 2005
Posts: 36
I am getting this following error,can any body please suggest why iam getting error and what could be the problem.It seems to be struts-config file is fine..

here is my struts-config.xml:

here is my web.xml file:


Error message iam getting
14:07:50,552 ERROR [Digester] Parse Error at line 46 column 17: The content of e
lement type "struts-config" must match "(data-sources?,form-beans?,global-except
ions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)
".
org.xml.sax.SAXParseException: The content of element type "struts-config" must
match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-map
pings?,controller?,message-resources*,plug-in*)".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known 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 S
ource)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)

at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
n Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known 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:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
rvlet.java:708)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
.java:670)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1091)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:92
5)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3857)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
Cendy Nguvy
Ranch Hand

Joined: May 25, 2005
Posts: 37
Hi,

Order of tags in the struts-config file matters.
If you look at the error message, it will show you the order of the elements :



So, put <global-forwards> before <action-mappings>.
[ July 19, 2005: Message edited by: Cendy Nguvy ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts war deploy problem
 
Similar Threads
Struts 1.1 - Tomcat 4.1.30 deployment problem
need help in web.xml
What Is Wrong With My web.xml File (Struts)
Cannot find ActionMappings or ActionFormBeans collection
struts forward link?