更新时间:2023-01-07 18:30:50
问题在于 struts.xml
中的拦截器.
The problem is with your interceptors in struts.xml
.
删除它们或正确指定它们.您已经覆盖了 defaultstack
这不是一个好习惯.
Either remove them or specify them properly. You have override defaultstack
Which is not good practice.
您应该将拦截器堆栈的名称设置为与 struts 堆栈不同的自定义名称.
例如,将您的堆栈命名为 mystack.
For Example, name your stack as mystack.
<interceptors>
<interceptor-stack name="mystack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="json">
<param name="enableSMD">true</param>
</interceptor-ref>
</interceptor-stack>
</interceptors>
这就是defaultstack
+json拦截器的所有拦截器.这将被打包在名为 mystack 的拦截器堆栈中
This means all the interceptors of defaultstack
+ json interceptor. This will be packed in interceptor stack named as mystack