2013年9月13日星期五

struts2 interceptor problem

Just learning struts2, inside the interceptor configuration file has a parameter RETRIEVE , I ask you this parameter is used to do , a lot of information from the online search , are not very clear , thank you ah !
------ Solution ---------------------------------------- ----
  <!-- 基于paramsPrepareParamsStack,  
            增加store interceptor保证actionMessage在redirect后不会丢失 -->  
        <interceptors>  
            <interceptor-stack name="crudStack">  
                <interceptor-ref name="store">  
                    <param name="operationMode">AUTOMATIC</param>  
                </interceptor-ref>  
                <interceptor-ref name="paramsPrepareParamsStack" />  
            </interceptor-stack>  
        </interceptors>  

------ For reference only ---------------------------- -----------
this we do not know?
------ For reference only -------------------------------------- -

Hello , about operationMode parameters , what values ​​are , ah, what the meaning of it all ? Online information less ah ! Thank you, ah !
------ For reference only -------------------------------------- -
http :/ / struts.apache.org/release/2.2.x/struts2-core/apidocs/org/apache/struts2/interceptor/MessageStoreInterceptor.html

In the 'STORE' mode, the interceptor will store the ValidationAware action's message / errors and field errors into HTTP session.

In the 'RETRIEVE' mode, the interceptor will retrieve the stored action's message / errors and field errors and put them back into the ValidationAware action.

In the 'AUTOMATIC' mode, the interceptor will always retrieve the stored action's message / errors and field errors and put them back into the ValidationAware action, and after Action execution, if the Result is an instance of ServletRedirectResult, the action's message / ; errors and field errors into automatically be stored in the HTTP session ..
------ For reference only ------------ ---------------------------

Thank you, ah ! :)

没有评论:

发表评论