刚学习struts2,配置文件里面的拦截器有一个参数<param name="operationMode">RETRIEVE</param>,请问大家这个参数是干什么用的,从网上查了好多资料,都不太清楚,谢谢大家啊!struts2paramoperationMode

解决方案 »

  1.   

      <!-- 基于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>  
      

  2.   

    您好,关于operationMode参数,都有哪些值啊,各代表什么意思呢?网上资料好少啊! 谢谢啊!
      

  3.   

    http://struts.apache.org/release/2.2.x/struts2-core/apidocs/org/apache/struts2/interceptor/MessageStoreInterceptor.htmlIn 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..