Re: DefaultGateway path to automatically pass session in URL from Flash
Will Prater <[email protected]>
| Newsgroups | gmane.comp.java.openamf.user |
|---|---|
| Message-ID | <[email protected]> |
List,
There is also this header which may be preferred since you wont need
to check whether you have an http connection etc:
String sessId = req.getSession().getId();
String newUrl = ";jsessionid=" + sessId;
AMFHeader gatewayHeader = new AMFHeader(
"AppendToGatewayUrl",
true,
newUrl);
responseMessage.addHeader(gatewayHeader);
On Jul 12, 2005, at 2:11 PM, Will Prater wrote:
> List,
>
> Here is a patch to automatically have Flash the session in the URL
> when cookies are not available. Please test this on Revisions 1.65
> and let me know if you have any troubles.
>
> We are extending DefaultGateway and we did not use this conditional:
> > if (!req.isRequestedSessionIdFromCookie()) {
>
> Im not certain that will work so if someone has better knowlege of
> Java's SESSION implementation they would be better suited to first
> find if the client was able to accept cookies. If not then you
> would add this header with each request.
>
>
> Thanks
>
>
> 197a198,207
> > String sessId = req.getSession().getId();
> > if (!req.isRequestedSessionIdFromCookie()) {
> > String newUrl = req.getRequestURL()
> > + ";jsessionid=" + sessId;
> > AMFHeader gatewayHeader = new AMFHeader(
> > "ReplaceGatewayUrl",
> > true,
> > newUrl);
> > responseMessage.addHeader(gatewayHeader);
> > }
>
>
>
> <DefaultGateway.patch>
>
>
> -WP3
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar