• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts war deploy problem

 
shailesh kumar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic