今天我快要吐血了,写了一个自己的拦截器,想试试功能的。哪知道问题频出,从昨天晚上一直到今天晚上。
这个project里面只有3个文件,index.jsp,welcome.jsp,login.jsp,只有一个action和一个interceptor,interceptor继承的是abstractInterceptor,老是报这种错误。
<struts>下面详细说明错误出现的过程
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<package name="default" namespace="/" extends="struts-default">
<interceptors>
<interceptor name="mySimple" class="com.dong.chun.interceptor.MyInterceptor"></interceptor>
</interceptors>
<global-results>
<result name="login">/login.jsp</result>
</global-results>
<action name="loginAction" class="com.dong.chun.action.LoginAction">
<interceptor-ref name="my"></interceptor-ref>
<interceptor-ref name="defaultStack"></interceptor-ref>
<result name="SUCCESS">/welcome.jsp</result>
</action>
</package>
</struts>
------解决方案--------------------
因为你web.xml文件中的初始页面就是index.jsp