Re: [Resin-interest] Cookie Domain

2008-03-20 Thread Andrew Fritz




So, to combine the to suggestions, is it possible to configure resin to
send 2 cookies via the cookie-domain tag in the web.xml file?

The conditional makes since at this point. 

Scott Ferguson wrote:

  On Mar 19, 2008, at 3:37 PM, Andrew Fritz wrote:

  
  
I need to set the cookie-domain differently depending on whether I'm
running local (for testing) or on our production servers. I haven't
found an documentation about how I might do do that.

Basically, if it is our production cluster I want a ".our.domain.com"
cookie domain. Right now the server issues "www.out.domain.com" or
"our.domain.com" - no leading period - based on how I get to the site,
which blows up if the users changes from www to non-www. If the server
is running on our test environment (like my laptop) I want a cookie
domain based on the request URL (default behavior).

  
  
You can use something like:

resin:choose
resin:when test="${dev}"
   session-config cookie-domain="dev.com"/
/resin:when
resin:otherwise
   session-config cookie-domain="domain.com"/
/resin:otherwise
/resin:choose

Then use -Ddev=true when starting Resin.

-- Scott

  
  

Any suggestions. I do NOT want 2 config files.

Andrew


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  
  


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest
  





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Cookie Domain

2008-03-20 Thread Andrew Fritz




Oh, I think you misunderstood.

In the production case I want to issue 2 cookies, one for domain.com
and one for www.domain.com. I know this isn't technically required, but
I'm curious if it is possible (without codding every entry point into
the system to do it manually).

Andrew

Scott Ferguson wrote:

  
  On Mar 20, 2008, at 1:30 AM, Andrew Fritz wrote:
  
  
 So, to combine the to
suggestions, is it possible to configure resin to send 2 cookies via
the cookie-domain tag in the web.xml file?

The conditional makes since at this point. 
  
  
  
I'm not sure I understand.
  
  
  The two cases are dev-mode vs deploy-mode. So there's only one
cookie, it's just different depending on what mode you're starting
Resin with.
  
  
  -- Scott
  
  


Scott Ferguson wrote:

  On Mar 19, 2008, at 3:37 PM, Andrew Fritz wrote:

  
  
I need to set the cookie-domain differently depending on whether I'm
running local (for testing) or on our production servers. I haven't
found an documentation about how I might do do that.

Basically, if it is our production cluster I want a ".our.domain.com"
cookie domain. Right now the server issues "www.out.domain.com" or
"our.domain.com" - no leading period - based on how I get to the site,
which blows up if the users changes from www to non-www. If the server
is running on our test environment (like my laptop) I want a cookie
domain based on the request URL (default behavior).

  
  You can use something like:

resin:choose
resin:when test="${dev}"
   session-config cookie-domain="dev.com"/
/resin:when
resin:otherwise
   session-config cookie-domain="domain.com"/
/resin:otherwise
/resin:choose

Then use -Ddev=true when starting Resin.

-- Scott

  
  
Any suggestions. I do NOT want 2 config files.

Andrew


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  
  

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest
  


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest
  
  
  
  

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest
  





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Cookie Domain

2008-03-20 Thread Scott Ferguson


On Mar 20, 2008, at 4:33 AM, Andrew Fritz wrote:


Oh, I think you misunderstood.

In the production case I want to issue 2 cookies, one for domain.com  
and one for www.domain.com. I know this isn't technically required,  
but I'm curious if it is possible (without codding every entry point  
into the system to do it manually).


Ok.

Not with the same cookie name, i.e. you can't have two JSESSIONID at  
once.  The browser doesn't send the domain with the cookie, it just  
sends the cookie name and value.


-- Scott




Andrew

Scott Ferguson wrote:



On Mar 20, 2008, at 1:30 AM, Andrew Fritz wrote:

So, to combine the to suggestions, is it possible to configure  
resin to send 2 cookies via the cookie-domain tag in the web.xml  
file?


The conditional makes since at this point.


I'm not sure I understand.

The two cases are dev-mode vs deploy-mode.  So there's only one  
cookie, it's just different depending on what mode you're starting  
Resin with.


-- Scott




Scott Ferguson wrote:


On Mar 19, 2008, at 3:37 PM, Andrew Fritz wrote:


I need to set the cookie-domain differently depending on whether  
I'm
running local (for testing) or on our production servers. I  
haven't

found an documentation about how I might do do that.

Basically, if it is our production cluster I want a  
.our.domain.com

cookie domain. Right now the server issues www.out.domain.com or
our.domain.com - no leading period - based on how I get to the  
site,
which blows up if the users changes from www to non-www. If the  
server
is running on our test environment (like my laptop) I want a  
cookie

domain based on the request URL (default behavior).


You can use something like:

resin:choose
resin:when test=${dev}
   session-config cookie-domain=dev.com/
/resin:when
resin:otherwise
   session-config cookie-domain=domain.com/
/resin:otherwise
/resin:choose

Then use -Ddev=true when starting Resin.

-- Scott



Any suggestions. I do NOT want 2 config files.

Andrew


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Cookie Domain

2008-03-19 Thread Scott Ferguson

On Mar 19, 2008, at 3:37 PM, Andrew Fritz wrote:

 I need to set the cookie-domain differently depending on whether I'm
 running local (for testing) or on our production servers. I haven't
 found an documentation about how I might do do that.

 Basically, if it is our production cluster I want a .our.domain.com
 cookie domain. Right now the server issues www.out.domain.com or
 our.domain.com - no leading period - based on how I get to the site,
 which blows up if the users changes from www to non-www. If the server
 is running on our test environment (like my laptop) I want a cookie
 domain based on the request URL (default behavior).

You can use something like:

resin:choose
resin:when test=${dev}
   session-config cookie-domain=dev.com/
/resin:when
resin:otherwise
   session-config cookie-domain=domain.com/
/resin:otherwise
/resin:choose

Then use -Ddev=true when starting Resin.

-- Scott



 Any suggestions. I do NOT want 2 config files.

 Andrew


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest