wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: RequestCycleListener and setPageExpiredErrorPage
Date Mon, 13 Jan 2014 09:46:03 GMT
Hi,

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 10:52 AM, <Christoph.Manig@t-systems.com> wrote:

> Hello,
>
> in my application I do the following configurations:
> getApplicationSettings().setPageExpiredErrorPage(Timeout.class);
>
> getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
> getRequestCycleListeners().add(new RequestCycleExceptionListener());
>
> my RequestCycleExceptionListener looks like this:
> public class RequestCycleExceptionListener extends
> AbstractRequestCycleListener {
>
>     @Override
>     public IRequestHandler onException(RequestCycle cycle, Exception ex) {
>

return null in case of: ex instanceOf PageExpiredException


>         return new RenderPageRequestHandler(new PageProvider(new
> InternalError(getStackTrace(ex))));
>    }
>
>     private String getStackTrace(Exception ex) {
>         return ex.getMessage();
>     }
> }
>
> Now my problem, if the session expired I will be directed to my
> InternalError-Page. There I can see the Message page xyz expired. But I
> want to be directed to my Timeout-page. It will be right if I delete the
> two lines where I add my RequestCycleListener. What should I do to be
> directed to the timeout-page if the session expires and to the
> InternalError-page if an exception is thrown?
>
> Can anybody help me please?
>
>
> Mit freundlichen Grüßen
> Christoph Manig
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message