Re: Sessions DirectAction Apache Rewrite und Cookies
Re: Sessions DirectAction Apache Rewrite und Cookies
- Subject: Re: Sessions DirectAction Apache Rewrite und Cookies
- From: D Tim Cummings <email@hidden>
- Date: Wed, 17 Nov 2010 21:57:09 +1000
One word of warning. Don't remove the AppName from the domainForIDCookies if it is possible that your users will be using more than one WebObjects app on the same host name at the same time.
Tim
On 17/11/2010, at 5:10 AM, Chuck Hill wrote:
> Try adding this to your session:
>
> /**
> * Despite the name, this is actually the path used in the cookies for the session ID and instance number.
> * Returning just the root '/' ensures that the cookies are always sent for any request to the domain.
> * This was needed so that they are sent with URLs which will be rewritten.
> * Note that super.domainForIDCookies() would return: /cgi-bin/WebObjects/AppName.woa
> *
> * @return "/"
> */
> public String domainForIDCookies()
> {
> return "/";
> }
>
>
> Chuck
>
>
> On Nov 16, 2010, at 3:13 AM, ute Hoffmann wrote:
>
>> Hi,
>> I have a application which has sessions, but defaults to direct Actions.
>>
>> As a Apache rewrite of the URLs strips the wosid from the Direct Adtion URLS,
>> the session is lost with every click on a hyperlink.
>>
>> I tried to have the sessions stored in cookies in place of in the URL. But the session loss
>> still takes place.
>>
>> This is what I did in session.java:
>> setStoresIDsInURLs(false);
>> setStoresIDsInCookies(true);
>>
>> The URL in Cookies seemed to work for wo-links but not for the directAction links.
>>
>> Question:
>> a) Does someone know whether Apache rewrite strips the URL by rewriting from cookies as well?
>> b) Does Session in Cookies work in connection with direct Action and the call to existing Session in the directAction?
>> c) Did I miss something when changing between Session in URL and Cookies, do I need more than the
>> above (Change session Store to cookies in Session) to get this working with DirectActions?
>>
>>
>> Thanks for your help. The App is running wonder (the version from 2007, wo 5.5).
>>
>> Regards,
>>
>> Ute
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> --
> Chuck Hill Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden