Interceptor Help

Category: Web Develop
 
ashelyloveyu
2013-08-20 02:31:17

Sponsored Links
struts.xml part of the code

<struts>
<package name = "default" extends = "struts-default" namespace = "/">
<interceptors>
<interceptor ; name = "auth" class = "interceptor.AuthenticationInterceptor" />
</interceptors>
; <action name="login" class="action.LoginAction">
; <result name="success"> / pages / success.jsp </result>
; <result name="input"> / login.jsp </result>
; <interceptor-ref name="auth" />
</action>
</package>
</struts>

project name as input http://localhost:8080/cm/login cm I now want to intercept it will jump to the login.jsp page (realized)

But now there is a problem is the login.jsp form form pointing login login button so once point out interceptor interceptor that is not logged into the

I ask how to solve

Sponsored Links

henryzhou627
2013-08-20 02:40:15
two interceptor interceptor to set a default login page is used to check all the permissions, another interceptor Check the login
wgk2525
2013-08-20 02:43:41


I want to give you my simple point after the change or not this is the part of the code does not want to intercept login execute method

jsp: <form action="login!execute.action">

configuration file: < ; action name = "login" class = "action.LoginAction" method = "execute">
; <result name="success"> / pages / success.jsp </result>
; <result name="input"> / login.jsp </result>
; <interceptor-ref name="auth">
; <param name="excludeMethods"> execute </param>
</ interceptor-ref>

such a change was intercepted over what method execute method ah I just want to get an interceptor
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.