Re: session lost with session cookie and apache mod_ rewrite[SOLVED]
Re: session lost with session cookie and apache mod_ rewrite[SOLVED]
- Subject: Re: session lost with session cookie and apache mod_ rewrite[SOLVED]
- From: Paolo Sommaruga <email@hidden>
- Date: Fri, 31 Aug 2007 18:54:50 +0200
Thanks Chuck, Giles,
override Session.domainForIDCookies() have solved my problem. Such
method was the missing piece for me
Paolo
Il giorno 31/ago/07, alle ore 17:38, Chuck Hill ha scritto:
See WOSession.domainForIDCookies(). Add this to your session:
public String domainForIDCookies() {
return "/';
}
That is it. :-)
Chuck
On Aug 31, 2007, at 8:16 AM, Paolo Sommaruga wrote:
Hi guys,
maybe this is a little off topic but perhaps somebody has already
met this trouble that torments me. I' ve a WO application which
works fine with session id in url and apache mod_ rewrite, but I'm
in trouble if I switch to session cookie mode.
I enable the cookies in the following way
public Session() {
super();
setStoresIDsInURLs(false);
setStoresIDsInCookies(true);
}
and the following is my rule in apache rewrite (v 1.3.x)
RewriteRule ^/name/([^/]+)$ /cgi-bin/WebObjects/PasoPage.woa/wa/
displayPage?name=$1 [PT]
It happens that static-like url, like www.myserver.com/name/
MyPage, is properly converted into the url
www.myserver.com/cgi-bin/WebObjects/PasoPage.woa/wa/displayPage?
name=MyPage
but WO opens the page in a new session. It seems that WO can't see
the rewrited url coming from the same session of the surfing of
the previous pages.
As I' ve said, there's no problem if I work with session id in url.
Can you suggests any hints?
Regards
Paolo Sommaruga
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
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
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
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