You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Saldy Mathew <sm...@webifyservices.com> on 2004/11/05 22:45:25 UTC
SessionTimeOut Issue.
Is there a way to know whether a session has timed out in org.apache.tapestry.html.BasePage ?
I am aware of the handleStaleSessionException method available in BaseEngine.
/**
* Redirect to SessionTimeOut page when the session becomes stale.
*/
protected void handleStaleSessionException(StaleSessionException ex, IRequestCycle cycle,
ResponseOutputStream output)
throws IOException, ServletException {
redirect("SessionTimeOut", cycle, output, ex);
}
-Saldy
Re: SessionTimeOut Issue.
Posted by Jonathan Millett <jo...@millett.net>.
You could try calling the isNew() method on the HttpSession:
cycle.getRequestContext().getSession().isNew();
This won't help distinguish between a truly new session and a timed out
one, but might be useful for pages where both new (stateless) and
expired sessions are not allowed.
Saldy Mathew wrote:
>Is there a way to know whether a session has timed out in org.apache.tapestry.html.BasePage ?
>
>I am aware of the handleStaleSessionException method available in BaseEngine.
>
> /**
> * Redirect to SessionTimeOut page when the session becomes stale.
> */
> protected void handleStaleSessionException(StaleSessionException ex, IRequestCycle cycle,
> ResponseOutputStream output)
> throws IOException, ServletException {
> redirect("SessionTimeOut", cycle, output, ex);
> }
>
>-Saldy
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org