Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Igor Vaynberg
so for guests do not return the login page, but a homepage instead... -igor On Fri, May 13, 2011 at 9:03 PM, Alec Swan alecs...@gmail.com wrote: The login page is returned from WebRequestCycle#onRuntimeException() and Application#getHomePage() and there is also a

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Alec Swan
In our case login page is the home page. Please let me clarify the scenario we need to support: 1. Guest opens the website, clicks on tab1 and stays on it for a while 2. Session times out 3. Guest clicks on tab2 Current behavior: Guest is redirected to a login page Desired behavior: Guest is

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Igor Vaynberg
i can only assume that tab 2 is either bookmarkable or hybrid. if it is, you may be able to check the referer header and if its bookmarkable or hybrid redirect back to it. -igor On Sat, May 14, 2011 at 9:15 AM, Alec Swan alecs...@gmail.com wrote: In our case login page is the home page.

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Alec Swan
Igor, if I understood correctly you recommend redirecting back to tab2 from the login page. If so, what is the recommended way to do this? Do I get referrer ULR with ((WebRequest) getRequest()).getHttpServletRequest().getHeader(Referer) and throw some kind of exception which redirects back to that

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Alec Swan
I put the following code in RequestCycle#onRuntimeException() but it redirects me to Wicket's Page Expired page?! if (e instanceof PageExpiredException) { final HttpServletRequest httpServletRequest = ((WebRequest) getRequest()).getHttpServletRequest(); final String

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread jcgarciam
/SendEmail.jtp?type=nodenode=3522892i=20 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Handling-session-and-load-balancer-cookie-timeout-tp3521417p3522892.html To start a new topic under

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Alec Swan
The Referer header value is http://localhost:8080/lrm/ms/oid/389.0. This URL displays the right page when I open it from the browser. On Sat, May 14, 2011 at 12:41 PM, jcgarciam jcgarc...@gmail.com wrote: How does  Referer header value looks like?, is it a bookmarkable url? Try

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Igor Vaynberg
setRequestTarget(new RedirectRequestTarget(referrerUrl)); return super.onRuntimeException(page, e); } instead of return super... return null -igor On Sat, May 14, 2011 at 11:18 AM, Alec Swan alecs...@gmail.com wrote: I put the following code in

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Alec Swan
Even returning null causes the page to get redirected to Wicket's Page Expired page. I am using Wicket 1.4.14. Here is the code (referrerUrl is http://localhost:8080/lrm/ms/oid/389.1) @Override public Page onRuntimeException(Page page, RuntimeException e) { final HttpServletRequest

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Igor Vaynberg
maybe use return new redirectpage(url) -igor On Sat, May 14, 2011 at 1:37 PM, Alec Swan alecs...@gmail.com wrote: Even returning null causes the page to get redirected to Wicket's Page Expired page. I am using Wicket 1.4.14. Here is the code (referrerUrl is

Re: Handling session and load-balancer cookie timeout

2011-05-14 Thread Alec Swan
Thanks, that got redirection to work! Unfortunately, I was redirected back to tab1 instead of tab2. But, I guess this is because I am using AJAX-based panel swapping to implement tabs. Alec On Sat, May 14, 2011 at 2:53 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: maybe use return new

Handling session and load-balancer cookie timeout

2011-05-13 Thread Alec Swan
Hello, Our webapp has two types of users - Admins and Guests. Guests can view the site without logging in. However, when the session times out or load-balancer cookie expires Guests, like Admins are redirected to our login page, which confuses the Guests. What's a good way to redirect Guests

Re: Handling session and load-balancer cookie timeout

2011-05-13 Thread Igor Vaynberg
what is redirecting them back? -igor On Fri, May 13, 2011 at 3:45 PM, Alec Swan alecs...@gmail.com wrote: Hello, Our webapp has two types of users - Admins and Guests. Guests can view the site without logging in. However, when the session times out or load-balancer cookie expires Guests,

Re: Handling session and load-balancer cookie timeout

2011-05-13 Thread Alec Swan
The login page is returned from WebRequestCycle#onRuntimeException() and Application#getHomePage() and there is also a RestartResponseAtInterceptPageException(LOGIN_PAGE) thrown from IAuthorizationStrategy#isInstantiationAuthorized(). I am not sure how session timeout is handled by wicket, but I