This problem has plagued me for one afternoon, but it is really tangled because it is not configured after the intercepter of struts2 is configured.
RedDefaultstack, ThisDefaultstackIt is well-designed and cannot be injected without it. RememberDefaultstackThe front and back of the interceptor cannot be reversed; otherwise, some content in the value stack on the page may not exist. For example, the content of addfielderror may be blank, which is a problem I encountered, hope to help you.
<Package name = "org" extends = "struts-Default" namespace = "/org">
<! -- Configure the filter for exception handling -->
<Interceptors>
<Interceptor name = "myexceptioninterceptor" class = "com. yy. intercepter. commexceptioninterceptor"> </interceptor>
<Interceptor-stack name = "mystack">
<Interceptor-ref name = "defaultstack"> </Interceptor-ref>
<Interceptor-ref name = "myexceptioninterceptor"> </Interceptor-ref>
</Interceptor-stack>
</Interceptors>
<Action name = "org" class = "orgaction">
<! -- Call Interceptor -->
<Interceptor-ref name = "mystack"/>
<Result name = "success">/OrgN/index. jsp </result>
<Result name = "show_org" type = "redirectaction">
<Param name = "actionname"> org </param>
<Param name = "namespace">/org </param>
</Result>
<! -- Exception Handling -->
<Result name = "input">/OrgN/add_input.jsp </result>
<Exception-mapping result = "exception" exception = "com. yy. Exception. commexception"> </exception-mapping>
<Result name = "exception">/common/exception. jsp </result>
</Action>
</Package>