package里元素必须按照一定的顺序排列:
result-types
interceptors
default-interceptor-ref
default-action-ref
default-class-ref
global-results
global-exception-mappings
action*(就是所有的action放到最后)
否则,tomcat启动时报错: 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*)".
Struts2配置顺序指南
本文详细介绍了Struts2框架中package元素内各组成部分的正确排列顺序,包括result-types、interceptors等,若顺序错误会导致Tomcat启动失败。
1万+

被折叠的 条评论
为什么被折叠?



