Hi,

Martin Grigorov
Wicket Training and Consulting


On Mon, Jan 13, 2014 at 10:52 AM, <christoph.ma...@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
>
>
>

Reply via email to