Re: cookie based session sharing among web apps

2003-07-08 Thread Tim Funk
No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
I am keen on having two web applications be able to share sessions.  
Currently, tomcat creates and maintains a session for each web 
application for a client.  Moving the session id to the url is an 
option, but one I hope to avoid because of the refactoring it would 
generate in my applications jsps.

In essence, I want tomcat to use / as the url path in the JSESSIONID 
cookie, and use this session id in all web applications the tomcat 
server hosts.

Can this be accomplished solely with configuration?

Thank You
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: cookie based session sharing among web apps

2003-07-08 Thread Angus Mezick
Not as far as I can tell from digging through the session manager code.
It looks like each context has their own session manager which stores a
list of active sessions in a hashmap.  I think you are going to have to
get rather creative with this one.  I.E. create a patch that allows all
tomcat contexts to share the same cookie.
--Angus

 -Original Message-
 From: Harris Cotton [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 07, 2003 11:07 PM
 To: [EMAIL PROTECTED]
 Subject: cookie based session sharing among web apps
 
 
 I am keen on having two web applications be able to share sessions.  
 Currently, tomcat creates and maintains a session for each 
 web application 
 for a client.  Moving the session id to the url is an option, 
 but one I hope 
 to avoid because of the refactoring it would generate in my 
 applications 
 jsps.
 
 In essence, I want tomcat to use / as the url path in the 
 JSESSIONID 
 cookie, and use this session id in all web applications the 
 tomcat server 
 hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 
 _
 The new MSN 8: smart spam protection and 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: cookie based session sharing among web apps

2003-07-08 Thread Abid Ali Teepo

I guess you could use a filter, and program all the session handling yourself 

-Original Message-
From: Angus Mezick [mailto:[EMAIL PROTECTED]
Sent: 8. juli 2003 15:33
To: Tomcat Users List
Subject: RE: cookie based session sharing among web apps


Not as far as I can tell from digging through the session manager code.
It looks like each context has their own session manager which stores a
list of active sessions in a hashmap.  I think you are going to have to
get rather creative with this one.  I.E. create a patch that allows all
tomcat contexts to share the same cookie.
--Angus

 -Original Message-
 From: Harris Cotton [mailto:[EMAIL PROTECTED] 
 Sent: Monday, July 07, 2003 11:07 PM
 To: [EMAIL PROTECTED]
 Subject: cookie based session sharing among web apps
 
 
 I am keen on having two web applications be able to share sessions.  
 Currently, tomcat creates and maintains a session for each 
 web application 
 for a client.  Moving the session id to the url is an option, 
 but one I hope 
 to avoid because of the refactoring it would generate in my 
 applications 
 jsps.
 
 In essence, I want tomcat to use / as the url path in the 
 JSESSIONID 
 cookie, and use this session id in all web applications the 
 tomcat server 
 hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 
 _
 The new MSN 8: smart spam protection and 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cookie based session sharing among web apps

2003-07-08 Thread Johannes Fiala
Yes,

details: http://www.fwd.at/tomcat/sharing-session-data-howto.html

(of course it's a workaround, but it works great with some restrictions 
regarding session serialization and clustering as I use a Context to store 
the shared session data;
using a global cookie at root you can share one sessionid with other 
contexts).

Johannes




Tim Funk [EMAIL PROTECTED] 
08.07.2003 13:21
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
 I am keen on having two web applications be able to share sessions. 
 Currently, tomcat creates and maintains a session for each web 
 application for a client.  Moving the session id to the url is an 
 option, but one I hope to avoid because of the refactoring it would 
 generate in my applications jsps.
 
 In essence, I want tomcat to use / as the url path in the JSESSIONID 
 cookie, and use this session id in all web applications the tomcat 
 server hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: cookie based session sharing among web apps

2003-07-08 Thread Johannes Fiala
Ooops - I over-read the comment regarding solely with configuration - 
well as Tim already pointed out the servlet spec doesn't permit it. You'll 
have to throw in some Java code to get things running, but finally it's 
possible to do it - you find a detailed how-to at the link I enclosed.

However, I used the Context to store the shared session data which should 
be ok for smaller traffic, but might cause troubles if lot's of data have 
to be pumped into shared sessions. Then I'd encourage you to use a 
database or other persistence mechanisms :)

johannes




Johannes Fiala [EMAIL PROTECTED] 
08.07.2003 23:01
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






Yes,

details: http://www.fwd.at/tomcat/sharing-session-data-howto.html

(of course it's a workaround, but it works great with some restrictions 
regarding session serialization and clustering as I use a Context to store 

the shared session data;
using a global cookie at root you can share one sessionid with other 
contexts).

Johannes




Tim Funk [EMAIL PROTECTED] 
08.07.2003 13:21
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
 I am keen on having two web applications be able to share sessions. 
 Currently, tomcat creates and maintains a session for each web 
 application for a client.  Moving the session id to the url is an 
 option, but one I hope to avoid because of the refactoring it would 
 generate in my applications jsps.
 
 In essence, I want tomcat to use / as the url path in the JSESSIONID 
 cookie, and use this session id in all web applications the tomcat 
 server hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Re: cookie based session sharing among web apps

2003-07-08 Thread Johannes Fiala
Yes,

details: http://www.fwd.at/tomcat/sharing-session-data-howto.html

(of course it's a workaround, but it works great with some restrictions 
regarding session serialization and clustering as I use a Context to store 
the shared session data;
using a global cookie at root you can share one sessionid with other 
contexts).

Johannes




Tim Funk [EMAIL PROTECTED] 
08.07.2003 13:21
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
 I am keen on having two web applications be able to share sessions. 
 Currently, tomcat creates and maintains a session for each web 
 application for a client.  Moving the session id to the url is an 
 option, but one I hope to avoid because of the refactoring it would 
 generate in my applications jsps.
 
 In essence, I want tomcat to use / as the url path in the JSESSIONID 
 cookie, and use this session id in all web applications the tomcat 
 server hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: cookie based session sharing among web apps

2003-07-08 Thread Johannes Fiala
Ooops - I over-read the comment regarding solely with configuration - 
well as Tim already pointed out the servlet spec doesn't permit it. You'll 
have to throw in some Java code to get things running, but finally it's 
possible to do it - you find a detailed how-to at the link I enclosed.

However, I used the Context to store the shared session data which should 
be ok for smaller traffic, but might cause troubles if lot's of data have 
to be pumped into shared sessions. Then I'd encourage you to use a 
database or other persistence mechanisms :)

johannes




Johannes Fiala [EMAIL PROTECTED] 
08.07.2003 23:01
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






Yes,

details: http://www.fwd.at/tomcat/sharing-session-data-howto.html

(of course it's a workaround, but it works great with some restrictions 
regarding session serialization and clustering as I use a Context to store 

the shared session data;
using a global cookie at root you can share one sessionid with other 
contexts).

Johannes




Tim Funk [EMAIL PROTECTED] 
08.07.2003 13:21
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: cookie based session sharing among web apps






No - it breaks the servlet spec. Sessions are scoped to their own webapp.

-Tim

Harris Cotton wrote:
 I am keen on having two web applications be able to share sessions. 
 Currently, tomcat creates and maintains a session for each web 
 application for a client.  Moving the session id to the url is an 
 option, but one I hope to avoid because of the refactoring it would 
 generate in my applications jsps.
 
 In essence, I want tomcat to use / as the url path in the JSESSIONID 
 cookie, and use this session id in all web applications the tomcat 
 server hosts.
 
 Can this be accomplished solely with configuration?
 
 Thank You
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





cookie based session sharing among web apps

2003-07-07 Thread Harris Cotton
I am keen on having two web applications be able to share sessions.  
Currently, tomcat creates and maintains a session for each web application 
for a client.  Moving the session id to the url is an option, but one I hope 
to avoid because of the refactoring it would generate in my applications 
jsps.

In essence, I want tomcat to use / as the url path in the JSESSIONID 
cookie, and use this session id in all web applications the tomcat server 
hosts.

Can this be accomplished solely with configuration?

Thank You

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]