users@javaserverfaces.java.net

Re: SJSAS : Application timeout happens, how do I redirect the user?

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Fri, 24 Aug 2007 14:32:47 -0700

Todd Patrick wrote:
> Sun Java System Application Server Platform Edition 9.0_01 (build
> b02-p01) running on Solaris 10
> Java EE 5
> JSF 1.2
>
> Use case:
>
> The user leaves the application open in their browser over night, the
> application times out. When the user returns in the morning and clicks
> on *any* link or button on the page - the user should be redirected to
> the application login page.
>
> 1.) I'm sure this was thought of, what do I use in the Java EE 5 API to
> accomplish this?
>
> 2.) Or, do I use a JSF Lifecycle PhaseListener?
>
> 3.) What really happens inside Sun Java System Application Server when
> an application times out?
>
If you're using server side state saving and the user session times out, a
javax.faces.application.ViewExpired exception is thrown.

You could use the web application error-page functionality (defined in
the web.xml)
to create a page that will be forwarded to when the exception occurs.
This page in turn
can perform a redirect to the login page.

> Thanks,
>
> --Todd
>
> -----------------------------------------
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact
> the sender by reply email and destroy all copies of the original
> message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>
>