struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hue Holleran" <struts-user-h...@openAction.net>
Subject RE: Avoiding jsessionid appending in a redirect
Date Thu, 07 Aug 2003 11:58:27 GMT
Hi Chris,

I posted a response to this recently:

http://marc.theaimsgroup.com/?l=struts-user&m=106018678002719&w=2

> -----Original Message-----
> From: Chris Boulter [mailto:chris@jellybaby.net]
> Sent: 06 August 2003 19:27
> To: struts-user@jakarta.apache.org
> Subject: Avoiding jsessionid appending in a redirect
>
>
> Hi,
>
> Is there a way to insist that a jsessionid _doesn't_ get appended when
> returning a redirect from an Action? In my case, I'm redirecting to an
> external (non-Java) system and the jsessionid is causing the
> external system
> problems.
>
> I have
>     return new ActionForward("http://some.external.url/options", true)
> at the end of my execute() method in the Action. This is exactly
> the URL to
> which I want to redirect, but by the time the HTTP response is seen by the
> browser, it has a jsessionid on the end:
>
> HTTP/1.1 302 Moved Temporarily
> Set-Cookie: .....
> Location: http://some.external.url/options;jsessionid=foo.bar.com-24%3A3f4
>                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> I'm using SunONE v6 web server. I've tried adding this to web-apps.xml:
>     <session-tracking use-cookies="true" use-url-rewriting="false" />
> but it makes no difference. Interestingly, I can't reproduce the problem
> with TomCat (3.3.1a), although I'm not able to engineer exactly the same
> environment using TomCat.
>
> One theory I have is that Struts (or SunONE?) is interpreting my
> redirect as
> the first request to a webapp and, since it doesn't know whether cookies
> will be accepted, it is using URL rewriting 'just in case'.
>
> Many thanks,
>
> Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message