JakartaEE Struts2 The content of element type "package" must match "(result-types?,interceptors?,...

异常信息:

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*)".
JakartaEE Struts2 The content of element type "package" must match "(result-types?,interceptors?,...
异常.png

异常原因:

Struts2 框架中配置文件要按照顺序来写:

result-types 
interceptors 
default-interceptor-ref 
default-action-ref 
default-class-ref 
global-results 
global-exception-mappings 
action*

解决方法:

按照如上顺序排列:


JakartaEE Struts2 The content of element type "package" must match "(result-types?,interceptors?,...
解决方法.png