HTTP timeout

When one get the message "The HTTP session has timed out" how is it possible to redirect the user on particular page, say a Login page ? The message say to use "onSessionTimeout() method in the module servlet" but I do not see How to redirect from there ?
[291 byte] By [705397] at [2007-11-25 8:41:10]
# 1

> When one get the message "The HTTP session has timed

> out

> " how is it possible to redirect the user on

> particular page, say a Login page ?

> The message say to use "onSessionTimeout() method in

> the module servlet" but I do not see How to redirect

> from there ?

>

You forward to a ViewBean just like you would in any event handler. They key is that then you will generally want to throw a CompleteRequestException to stop processing after forwarding.

public void onSessionTimeout(RequestContext context)

{

ViewBean viewBean =

context.getRequest().getViewBeanManager().getViewBean(MyViewBean.class);

viewBean.forwardTo(context);

throw new CompleteRequestException();

}

Todd

ToddFast at 2007-7-1 15:19:27 > top of Java-index,Development Tools,Java Tools...