File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts war deploy problem" Watch "Struts war deploy problem" New topic

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
org.xml.sax.SAXParseException: The content of element type "struts-config" must
match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-map
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
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(
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionSe
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet
at org.apache.struts.action.ActionServlet.init(
at javax.servlet.GenericServlet.init(
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
at org.apache.catalina.core.StandardWrapper.load(
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
at org.apache.catalina.core.StandardContext.start(
Cendy Nguvy
Ranch Hand

Joined: May 25, 2005
Posts: 37

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:
subject: Struts war deploy problem
It's not a secret anymore!