Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAXException while parsing web.xml file in jboss 5.0 during deployment

 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

while i deployed myapp.war in deploy folder of jboss 5.0 i get the following error in console.

vfsfile:/D:/jboss-5.0.0/server/default/deploy/myapp.war/ -> org.xml.sax.S
AXException: The content of element type "web-app" must match "(icon?,display-na
me?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*
,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,erro
r-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-confi
g?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". @ vfsfile:/D:/jboss-5.0.
0/server/default/deploy/myapp.war/WEB-INF/web.xml[28,11]

My web.xml file has below content:



Please let me know what i can do further to resolve and have error free deployment

Thanks
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error message tells you the exact order which is required in the xml. The xml that you posted that the servlet-mapping is being used before the servlet element. Change the xml to bring down all the servlet-mapping elements after the servlet declarations.
 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks problem resolved
 
Ciro Arreola
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran Pai wrote: the exact order which is required in the xml


That helped me too! thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic