Hi,

It's certainly possible, with some additional work by you.

The easiest way:
- redirect the user to your login page, add a variable to the PageParameters which helps you redirect them back - after logging in, check for said variable in PageParameters and redirect the user back

Now the easiest way is to simply put the current url in PageParameters; If you do so, I'd make sure you check the url though, to prevent users from being redirected to another website.

Op 9-12-2011 12:47, schreef Nazaret Kazarian:
Hi there,

I am using Wicket 1.4.19 and trying to do what the subject says: Avoid
creating an HttpSession before the user logs in. Why would I want to
allocate memory for an unauthorized user, right?

I can make my login page stateless and if the user hits the login page
URL no session is created yet
(https://cwiki.apache.org/WICKET/stateless-pages.html). So far so
good.

BUT: If the user hits any other URL (such as the context root), she is
redirected to the login page and the redirect creates an HttpSession!
This is because onUnauthorizedInstantiation we throw a new
RestartResponseAtInterceptPageException(LoginPage.class), which sets
up a redirect through the page map, which creates a session.

Is there any other way to redirect the user to an intercept page
without using HttpSession at all? Would it be possible to redirect the
user without using the page Map? And maybe save the original URL,
client side, to use it after log in.

Thanks so much

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to