colocating wicket with servlets...
I would like to colocate a wicket application with a servlet. What I want is for the servlet to have access to the wicket session. Looking at the code I see that Session.get() uses thread-specific storage, so I want the wicket filter to intercept all requests. Next, I want to make sure that requests for the servlet are forwarded to the servlet and not handled by wicket. The wicket filter provides one way of doing this by specifying a number of ignored paths. But, how do I now which paths I can safely ignore? I can create mounts for all bookmarkable pages but how can I control the paths of non-bookmarkable URLs. Should I create a separate request coding strategy decorator (like CryptedUrlWebRequestCodingStrategy) or is there an easier way? Cheers Erik
Re: colocating wicket with servlets...
Hi Erik, Non-bookmarkable links either start with /resources or take the form /?wicket... You could indeed manage that by creating your own RequestCodingStrategy, but having done so a couple of times, I would like to warn you not to tweak too much. In Wicket 1.5 it is probably going to be a lot easier. Regards, Erik. Op 26-07-10 20:37, Erik Brakkee wrote: I would like to colocate a wicket application with a servlet. What I want is for the servlet to have access to the wicket session. Looking at the code I see that Session.get() uses thread-specific storage, so I want the wicket filter to intercept all requests. Next, I want to make sure that requests for the servlet are forwarded to the servlet and not handled by wicket. The wicket filter provides one way of doing this by specifying a number of ignored paths. But, how do I now which paths I can safely ignore? I can create mounts for all bookmarkable pages but how can I control the paths of non-bookmarkable URLs. Should I create a separate request coding strategy decorator (like CryptedUrlWebRequestCodingStrategy) or is there an easier way? Cheers Erik -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: colocating wicket with servlets...
see WicketSessionFilter -igor On Mon, Jul 26, 2010 at 11:37 AM, Erik Brakkee erik.brak...@gmail.com wrote: I would like to colocate a wicket application with a servlet. What I want is for the servlet to have access to the wicket session. Looking at the code I see that Session.get() uses thread-specific storage, so I want the wicket filter to intercept all requests. Next, I want to make sure that requests for the servlet are forwarded to the servlet and not handled by wicket. The wicket filter provides one way of doing this by specifying a number of ignored paths. But, how do I now which paths I can safely ignore? I can create mounts for all bookmarkable pages but how can I control the paths of non-bookmarkable URLs. Should I create a separate request coding strategy decorator (like CryptedUrlWebRequestCodingStrategy) or is there an easier way? Cheers Erik - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: colocating wicket with servlets...
On Mon, Jul 26, 2010 at 9:15 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: see WicketSessionFilter -igor Indeed, looking at the source code of WicketFilter, it does not seem to set the session for the current thread when one of the ignored paths is used.