struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ashokd" <ash...@visualsoft-tech.com>
Subject Re: session timeout not working anymore :(
Date Wed, 30 Jan 2002 11:24:42 GMT
Hi Sundar,

Istead of checking the session.
Put a parameter in session which is required to your entire application.
Check this parameter value.


<%

// check whether the UserName in the session is null

String loginName = (String)session.getValue("LoginName");

if (loginName == null || loginName.equals("")){
 response.sendRedirect("Login.jsp");
 return;
}

%>

Don't put this code for login page.


Thanks & Regards,
Ashok.D


----- Original Message -----
From: "Sundar Narasimhan" <sundar@ascent.com>
To: <ashokd@visualsoft-tech.com>; <struts-user@jakarta.apache.org>
Sent: Wednesday, February 05, 2003 7:13 PM
Subject: Re: session timeout not working anymore :(


> >Best Suggestion is:
> >
> >1)Over Ride ActionServlet and place session expire code(redirect login
page
> >or some other stuff). This will work for if the user clicks any buttons,
> >action events.
> >
> >2) Now we need to handle page refreshes (i.e JSPs)
> >
> >write a simple jsp, which consist simple logic check session, if session
is
> >null redirect to login page or some stuff.
> >Include this jsp, where ever you required.
> But Ashok -- this is exactly what we have. What do you do if
>     request.getSession(false)
> does NOT return null as advertised when the session has actually
> expired? I don't think moving the logic elsewhere will help, and I
> don't really care that much about re-factoring etc.
>
> In short, I think this is a bug! and I'd be happy to hear how you've
> solved it if you've experienced it.
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
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