Quantcast

Exception when Session expired

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Exception when Session expired

sylvain
Hi,

I miragte in wicket 1.5 and I change the run timeException by this code

                getRequestCycleListeners().add(new CommonRequestCycleListener() {
                        @Override
                        public void onExceptionRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler, Exception exception) {
                                // TODO Auto-generated method stub
                                super.onExceptionRequestHandlerResolved(cycle, handler, exception);
                        }
                       
                        @Override
                        public IRequestHandler onException(RequestCycle cycle, Exception e) {
                                Page page = new ErrorPage(e);
                                try {
                                        .....

                                        if (e instanceof PageExpiredException) {
                                                Page expirationPage = getExpirationPage();
                                        }
                                } catch (QuestionnaireOrFormulaireNotFoundException t) {
                                        page = new QuestionnaireOrFormulaireNotFoundPage();
                                } catch (Throwable t) {
                                        page = new ErrorFormulairePage(t, null);
                                }
                                return new RenderPageRequestHandler(new PageProvider(page));
                        }
                });
        }

it's ok for a lot of error except for the expiration session.

In wicket 1.4, when my session expired, i had a PageExpiredException but in wicket 1.5, don't it.

Have you an idea why?
How i can catch the exception of the expiration session?

Thanks in advance

Sylvain
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Exception when Session expired

Martin Grigorov-4
Hi,

On Mon, Jun 11, 2012 at 6:01 PM, sylvain
<[hidden email]> wrote:

> Hi,
>
> I miragte in wicket 1.5 and I change the run timeException by this code
>
>                getRequestCycleListeners().add(new CommonRequestCycleListener() {
>                        @Override
>                        public void onExceptionRequestHandlerResolved(RequestCycle cycle,
> IRequestHandler handler, Exception exception) {
>                                // TODO Auto-generated method stub
>                                super.onExceptionRequestHandlerResolved(cycle, handler, exception);
>                        }
>
>                        @Override
>                        public IRequestHandler onException(RequestCycle cycle, Exception e) {
>                                Page page = new ErrorPage(e);
>                                try {
>                                        .....
>
>                                        if (e instanceof PageExpiredException) {
>                                                Page expirationPage = getExpirationPage();

Here 'expirationPage' is ignored.
Maybe it should be 'page = getExpirationPage()'

>                                        }
>                                } catch (QuestionnaireOrFormulaireNotFoundException t) {
>                                        page = new QuestionnaireOrFormulaireNotFoundPage();
>                                } catch (Throwable t) {
>                                        page = new ErrorFormulairePage(t, null);
>                                }
>                                return new RenderPageRequestHandler(new PageProvider(page));
>                        }
>                });
>        }
>
> it's ok for a lot of error except for the expiration session.
>
> In wicket 1.4, when my session expired, i had a PageExpiredException but in
> wicket 1.5, don't it.
>
> Have you an idea why?
> How i can catch the exception of the expiration session?
>
> Thanks in advance
>
> Sylvain
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Exception-when-Session-expired-tp4649854.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Exception when Session expired

sylvain
In reply to this post by sylvain
Hi Martin,

Yes it's more correct to put this code "page = getExpirationPage()".

But my problem, when my session expire, I never pass in the "onException".

Have you an idea why?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Exception when Session expired

Martin Grigorov-4
Read the conversation in thread "PageExpiredErrorPage not working" we
have at the moment.

On Wed, Jun 13, 2012 at 10:28 AM, sylvain
<[hidden email]> wrote:

> Hi Martin,
>
> Yes it's more correct to put this code "page = getExpirationPage()".
>
> But my problem, when my session expire, I never pass in the "onException".
>
> Have you an idea why?
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Exception-when-Session-expired-tp4649854p4649913.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...