struts 2 Bean does not populate in action class
I am using Struts 2-Spring framework in my assignment.
I have define开发者_如何学JAVAd a bean in struts 2 action class
One interceptor for checking authorisation before executing every action.
The bean is used for defining controls like textfield, Radio button, etc on jsp page.
On submit of this page control goes properly to defined action class, but finds bean object as null in action class. Hence unable to perform futher operations.
Removing interceptors works fine.
Any pointer will be appreciated.
I haven't defined stack for interceptors defined in struts.xml.
After defining below stack in struts.xml its works fine:
<interceptors>
<interceptor-stack name="applicationStack">
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="scopedModelDriven"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="checkbox"/>
<interceptor-ref name="multiselect"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="actionMappingParams"/>
<interceptor-ref name="params">
<param name="excludeParams">dojo\..*,^struts\..*</param>
</interceptor-ref>
<interceptor-ref name="conversionError"/>
<interceptor-ref name="validation">
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="workflow">
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="debugging"/>
<!-- User defined interceptor -->
<interceptor-ref name="contextSecurityInterceptor"/>
</interceptor-stack>
精彩评论