Hi,
On Thu, Aug 14, 2014 at 5:45 PM, ntvg <[email protected]> wrote:
>
>
> I am trying to server a particular error page when session timeouts to my
> users. For this i configured the error page on my Application's init
> method.
> But this thing is not working.
>
> I set up the session tiemout in 1 minute, after that nothing happen, I went
> through the logs, but wicket didn't throw any PageExpiredException.
>
Wicket will throw this exception only when you make a request to a page
from this expired session.
It will not throw the exception if there is no request.
>
> When session timeouts wicket simply logs it as: Session unbound:
> C061F4F21C41EDF13C66795DAC9EDD02 Removing data for pages in session with id
> 'C061F4F21C41EDF13C66795DAC9EDD02'
>
This is expected, yes.
Wicket notifies the application (and ISessionStore's listeners) when the
session is gone.
But it is not possible to notify the browser (by showing the
SessionExpiredPage) because the client is gone, right!
>
> this is my init method in my customApplication
>
> protected void init() {
> super.init();
>
>
>
> this.getApplicationSettings().setPageExpiredErrorPage(SessionExpiredPage.class);
>
>
> this.getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
> ...
> ...
> }
>
> I try with differents IExceptionSettings like SHOW_NO_EXCEPTION_PAGE or
> SHOW_EXCEPTION_PAGE
>
> my SessionExpiredPage.class
>
> public class SessionExpiredPage extends WebPage {
>
> public SessionExpiredPage() {
> this.setOutputMarkupId(true);
>
this is strange. the page cannot and need not to have markup id. Wicket
will ignore it.
> this.add(new Label("title", "Sesión Expirada"));
> CSSLoader.get().appendCssUntil(this, SessionExpiredPage.class);
> }
> }
>
> And i have a custom implementation of AbstractRequestCycleListener i
> override the OnException method But, when my session expire, I never pass
> in
> the "onException".
>
Yes, because the exception is thrown only when the client returns later
and try to use an expired page/a page from expired session.
>
> Thank You, best regards.
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/PageExpiredException-not-working-on-Session-expired-wicket-1-5-11-tp4667055.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>