//这是例子配置文件
<package name=“method" namespace="/" extends="struts-default">
<interceptors>
<interceptor name="method" class="interceptor.MethodInterceptor" />
</interceptors>
<action name="method*" class="action.MethodAction" method="method{1}">
<result>/method.jsp</result>
<interceptor-ref name="defaultStack" />
<interceptor-ref name="method" >
<param name="includeMethods">method1</param>
<param name="excludeMethods">method2,emthod3 </param>
</interceptor-ref>
</action>
</package>
刚接触 Struts ,不知怎地,includeMethods的方法没有被拦截(即doIntercept方法),而includeMethods 指定的方法却被执行了,在朋友的解释下,才放心自己在 方法名 后面加了“()”;
结果取了反,呵呵。希望不要犯这样的小纰漏,另外注意action 标签下 method 指定的方法, 也是
不要加 括号的。