On 31-03-2009 at 20:29, marc wrote:
> I am using a <stripes:link> tag to create links to different actionBeans and
> have a question.  I want to get rid of the jsessionId param that gets put into
> the url.

AFAIK, this is not possible: every exisyting servlet container will add this
parameter (as well as a Set-Cookie header) when the client doesn't send the
JSESSIONID cookie along. This is specified in the servlet specification.

The best you can do is write a filter that checks if the cookie is present.
If not, you don't serve the requested page but one that asks the browser to
go to the same URL. This page will have the JSESSIONID parameter attached,
but when the browser goes to the same (clean) URL again, it also sends the
cookie and you allow it to proceed as normal. So after the reload from the
browser, there will not be a JSESSIONID in the URL.

The downside of course is an endless loop when the browser doesn't support
cookies -- whether it's an old browser or cookies are disabled is irrelevant.


Oscar

-- 
   ,-_
  /() ) Oscar Westra van holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  DRM "manages access" in the same way that a jail "manages freedom".

------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to