• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2: error on adding <global-exception-mappings> tag to struts.xml

 
vikas sharmaa
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am getting below error after adding <global-exception-mappings> tag to struts.xml file for exception handling:

ERROR [main] (CommonsLogger.java:27) - The content of element type "package" mus
t match "(result-types?,interceptors?,default-interceptor-ref?,default-action-re
f?,default-class-ref?,global-results?,global-exception-mappings?,action*)". at (
null:28:12)

below is my struts.xml file:



on removing <global-exception-mappings> tag my application is working. please tell me where am going wrong. thanks.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about the error message don't you understand? It's telling you exactly what's wrong and how to fix it.
 
vikas sharmaa
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
newton,

it is saying that content of element type package must match result-types?,interceptors?,default-interceptor-ref?,default-action-re
f?,default-class-ref?,global-results?,global-exception-mappings?,action*

it means, <global-exception-mappings> tag is allowed under package tag. then why the error?
 
vikas sharmaa
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to write it below the result types. thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic