I want to use a global result "login". But it ony works without global-results in the configuration. This is the relevant part of my configuration:
categoryLi开发者_StackOverflow中文版st.jsp categoryDetail.jsp /WEB-INF/login.jsp
When I start my application it throws this Exception:
org.xml.sax.SAXParseException: The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)".
What is wrong?
Got it! The order matters.
Order in struts.xml matters:
- result-types?
- interceptors?
- default-interceptor-ref?
- default-action- ref?
- default-class-ref?
- global-results?
- global-exception-mappings?
- action*
Yes, the tags must be in order : result-types -> interceptors -> default-interceptor-ref -> default-action-ref -> default-class-ref -> global-results -> global-exception-mappings -> action*
精彩评论