当前位置: 网站首页 > JAVA > j2ee

Struts 2 Interceptors Tutorial

时间:1970-1-1 08:33:31来源: j2ee作者:admin 点击:0次 字体 [ С]

28.                            <param name="excludeMethods">populate</param>
29.                    </interceptor-ref>
30.                    <interceptor-ref name="workflow">
31.                            <param name="excludeMethods"> input,back,cancel,browse</param>
32.                    </interceptor-ref>
33.            </interceptor-stack>
34.        </interceptors>
35.        <action name="*Sample" method="{1}" class="vaannila.SampleAction">
36.            <interceptor-ref name="exampleStack" />
37.            <result name="populate">/first.jsp</result>
38.            <result name="success">/success.jsp</result>
39.        </action>
40.    </package>
41.</struts>
If you see our exampleStack the only change that we have done is, we have changed the excludeMethods of the validation interceptor, rest all is similar to the defaultStack. This is just to show you how to create your own interceptor stack, you can also achieve the same in a much simpler way.


发表评论
验证码:
最新评论
相关文章
最热文章