You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2009/06/04 02:02:06 UTC

T5: Host and cookies

Hi,

My App has a url: http://example.com, then user can also visit it
http://www.example.com. I use T5's cookie service to write some visitor's
related info back to the visitor's browser. the problem now is, if user uses
http://example.com, cookie will be under example.com, if he uses
www.example.com, then the cookie will be under www.example.com, the two now
looks different from each other as far as cookie is concerned, any thoughts
on keeping only one set of cookie for two urls(http:// or www.)? Thanks,

Angelo
-- 
View this message in context: http://www.nabble.com/T5%3A-Host-and-cookies-tp23861674p23861674.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Host and cookies

Posted by Angelo Chen <an...@yahoo.com.hk>.
t5 usually stores default cookie under www.example.com,  is there a way to
let t5 store under some other names like ".example.com", this might solve
the www.example.com or http://example.com problem? 


Bryan Lewis-5 wrote:
> 
> Can't you just use cookie.setDomain()?  Set both cookies to the same
> domain.  Doesn't sound Tapestry- or javascript-related.
> 
> 
> 
> On Wed, Jun 3, 2009 at 9:37 PM, Thiago H. de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
> 
>> Em Wed, 03 Jun 2009 21:02:06 -0300, Angelo Chen <
>> angelochen960@yahoo.com.hk> escreveu:
>>
>>  Hi,
>>>
>>
>> Hi!
>>
>>  My App has a url: http://example.com, then user can also visit it
>>> http://www.example.com. I use T5's cookie service to write some
>>> visitor's
>>> related info back to the visitor's browser. the problem now is, if user
>>> uses http://example.com, cookie will be under example.com, if he uses
>>> www.example.com, then the cookie will be under www.example.com, the two
>>> now looks different from each other as far as cookie is concerned, any
>>> thoughts on keeping only one set of cookie for two urls(http:// or
>>> www.)?
>>> Thanks,
>>>
>>
>> This is mostly Javascript related than Tapestry related, but I think one
>> elegant solution would be to use Tapestry to redirect all requests to the
>> same domain (www.example.com to example.com, for example).
>>
>> Don't forget that, in Tapestry, many problems can be solved using a
>> request
>> filter or a dispatcher. ;)
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java consultant, developer, and instructor
>> http://www.arsmachina.com.br/thiago
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-Host-and-cookies-tp23861674p23872473.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Host and cookies

Posted by Bryan Lewis <jb...@gmail.com>.
Can't you just use cookie.setDomain()?  Set both cookies to the same
domain.  Doesn't sound Tapestry- or javascript-related.



On Wed, Jun 3, 2009 at 9:37 PM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> Em Wed, 03 Jun 2009 21:02:06 -0300, Angelo Chen <
> angelochen960@yahoo.com.hk> escreveu:
>
>  Hi,
>>
>
> Hi!
>
>  My App has a url: http://example.com, then user can also visit it
>> http://www.example.com. I use T5's cookie service to write some visitor's
>> related info back to the visitor's browser. the problem now is, if user
>> uses http://example.com, cookie will be under example.com, if he uses
>> www.example.com, then the cookie will be under www.example.com, the two
>> now looks different from each other as far as cookie is concerned, any
>> thoughts on keeping only one set of cookie for two urls(http:// or www.)?
>> Thanks,
>>
>
> This is mostly Javascript related than Tapestry related, but I think one
> elegant solution would be to use Tapestry to redirect all requests to the
> same domain (www.example.com to example.com, for example).
>
> Don't forget that, in Tapestry, many problems can be solved using a request
> filter or a dispatcher. ;)
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T5: Host and cookies

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 03 Jun 2009 21:02:06 -0300, Angelo Chen  
<an...@yahoo.com.hk> escreveu:

> Hi,

Hi!

> My App has a url: http://example.com, then user can also visit it
> http://www.example.com. I use T5's cookie service to write some visitor's
> related info back to the visitor's browser. the problem now is, if user  
> uses http://example.com, cookie will be under example.com, if he uses
> www.example.com, then the cookie will be under www.example.com, the two  
> now looks different from each other as far as cookie is concerned, any  
> thoughts on keeping only one set of cookie for two urls(http:// or  
> www.)? Thanks,

This is mostly Javascript related than Tapestry related, but I think one  
elegant solution would be to use Tapestry to redirect all requests to the  
same domain (www.example.com to example.com, for example).

Don't forget that, in Tapestry, many problems can be solved using a  
request filter or a dispatcher. ;)

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org