struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tarun Dewan" <tarun.de...@nucleussoftware.com>
Subject Session expired
Date Wed, 24 Sep 2003 07:09:40 GMT
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message