Hi,

Just replace BookmarkablePageLink with Link:

//              add(new BookmarkablePageLink<Void>("auth2", 
AuthenticatedPage2.class));

                add(new Link<Void>("auth2" ) {

                        @Override
                        public void onClick()
                        {
                                setResponsePage(AuthenticatedPage2.class);
                        }
                });

The difference is that with Link Wicket will try to find the instance
of AuthenticatedPage to be able to execute onClick() of the Link
inside this page.
With BookmarkablePageLink there is no call to AuthenticatedPage at all
and thus there is no lookup for the expired page.

On Wed, Jun 13, 2012 at 12:49 PM, vaibhav2012 <[email protected]> wrote:
> Hi Martin,
>
> I am attaching a quick start sample application related to my scenario.
> The application is a secured web application.
>
> I have mounted a "SignInPage" and two authenticated pages
> "AuthenticatedPage1" and "AuthenticatedPage2".
> "AuthenticatedPage1" and "AuthenticatedPage2" can be accessed only after
> signing in.
> I have also made a SessionExpire page which should be shown in case of
> session timeout.
>
> I have implemented IAuthorizationStrategy in AuthStrategy class and have
> configured this in WebApplication's init() method.
>
>
> I have set the session timeout to 1 minute in web.xml file.
>
> *Scenario :*
> 1) Run the application.
> 2) Click on SignIn link in homepage.
> 3) SignIn with any combination of username and password.
> 4) Now click on "AuthenticatedPage" link and go that page.
> 5) Wait for more than 1 minute for session to timeout.
> 6) Now click on "Second Authenticated Page" link.
> At this point SessionExpire page should come up. This is the desired result.
> But it doesnt.
> Instead signin page comes up again.
>
> Please help me where i am going wrong.
>
> http://apache-wicket.1842946.n4.nabble.com/file/n4649921/SessionTest.rar
> SessionTest.rar
>
>
>
> -----
> Regards,
>
> Vaibhav Gupta
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905p4649921.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]
>



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

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

Reply via email to