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。。。
470 0
|
6月前
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]
|
4月前
|
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...]
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
Error: Element type is invalid: expected a string (for built-in components) or a class/function
2312 0
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
|
10月前
使用pageHelper报错 Type definition error: [simple type, classXXXX]
使用pageHelper报错 Type definition error: [simple type, classXXXX]
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
303 0
Posted content type isn't multipart/form-data
Posted content type isn't multipart/form-data
438 0
Caused by: 元素类型为 "package" 的内容必须匹配 "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,globa
在Struts-2.3的配置文件struts.xml中,Caused by: 元素类型为 "package" 的内容必须匹配 "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)"。
1283 0