Hi,

I guess I am fine with the intercepter side, but the issue is I am not able
to redirect it to a new page. The intercepter is working fine, but the
respone is coming back to the same page and not to the login page.

Any thing that I might be missing in the struts.xml or somewhere? coz
intercepter is fine all I need is to send it to new page.

Thanks 

Lukasz Lenart wrote:
> 
> package example3;
> 
> import com.opensymphony.xwork2.Action;
> import com.opensymphony.xwork2.ActionInvocation;
> import com.opensymphony.xwork2.interceptor.Interceptor;
> 
> /**
>  *
>  * @author Lukasz
>  */
> public class LoginInterceptor implements Interceptor {
> 
>     public void destroy() {
>     }
> 
>     public void init() {
>     }
> 
>     public String intercept(ActionInvocation arg0) throws Exception {
>         if (arg0.getAction() instanceof LoginAction) {
>             return arg0.invoke();
>         }
>         String user = (String)
> arg0.getInvocationContext().getSession().get("user");
>         if ( user == null || "".equals(user)) {
>             return Action.LOGIN;
>         } else {
>             return arg0.invoke();
>         }
>     }
> 
> }
> 
> 
> Regards
> -- 
> Lukasz
> http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Session-Management-tp23074591p23075474.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to