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...

异常信息:

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*)".
img_6358afb417ab746fa0379b77249b8aaf.png
异常.png

异常原因:

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

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

解决方法:

按照如上顺序排列:


img_7f6f8f06e2672fb3f906752429ed77ba.png
解决方法.png
目录
相关文章
|
Java 数据库连接 mybatis
mybaits报错:The content of element type “resultMap“ must match “(constructor?,id*,result*,associati。。。
mybaits报错:The content of element type “resultMap“ must match “(constructor?,id*,result*,associati。。。
545 0
|
5月前
|
XML 数据格式
Xml declaration should precede all document content
Xml declaration should precede all document content
|
5月前
|
Java
Found multiple occurrences of org.json.JSONObject on the class path:
Found multiple occurrences of org.json.JSONObject on the class path:
96 0
|
12月前
poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13]
poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13]
314 0
|
6月前
|
JSON Java 数据格式
Could not extract response: no suitable HttpMessageConverter found for ..content type [text/html...]
Could not extract response: no suitable HttpMessageConverter found for ..content type [text/html...]
634 0
|
Java 关系型数据库 MySQL
15. 成功解决:java: Can't generate mapping method with primitive return type.
今天启动 SpringBoot 项目时,报了如下错误:`java: Can't generate mapping method with primitive return type.`
1008 0
Could not resolve element type of Iterable type xxxxx.RequestParam java.util.List<?>. Not declared?
Could not resolve element type of Iterable type xxxxx.RequestParam java.util.List<?>. Not declared?
Could not resolve element type of Iterable type xxxxx.RequestParam java.util.List<?>. Not declared?
|
XML Java 数据格式
xml文件报错Element ‘beans‘ cannot have character [children), because the type‘s content type is element-
xml文件报错Element ‘beans‘ cannot have character [children), because the type‘s content type is element-
xml文件报错Element ‘beans‘ cannot have character [children), because the type‘s content type is element-
|
Java
java实战小结-Controller报错:Content type ‘multipart/form-data;boundary=----WebKitFormBoundaryxxxx not supp
java实战小结-Controller报错:Content type ‘multipart/form-data;boundary=----WebKitFormBoundaryxxxx not supp
401 0
|
JSON 数据格式
how does framework know the Advertisement model should be used to parse json
how does framework know the Advertisement model should be used to parse json
114 0
how does framework know the Advertisement model should be used to parse json