-----Original Message-----
From: Tarun Dewan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 24, 2003 12:40 PM
To: 'Struts Users Mailing List'
Subject: Session expired


Hi, 

I'm new to Struts and want to understand how user can be redirected to
login page in case of session timeout. Will following code works for
this handling:

************************************************************************
***************
public class LOSSessionLogOutHandler extends RequestProcessor 
{
        public LOSSessionLogOutHandler()
        {
                super();
        }
        
        public void process(javax.servlet.http.HttpServletRequest
request, javax.servlet.http.HttpServletResponse response) throws
IOException, ServletException
        {
                if(request.getSession(false)==null)
                {
                        response.sendRedirect("Login.los");
                }
                else
                {
                        super.process(request,response);
                }
        }
}
************************************************************************
****************

Do I need to enter information of this file in Struts Configuration file
also? 

Eaglerly awaiting for a favorable response. 

Thanks & regards,

Tarun Dewan. 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to