Thank you to you both, I understand now at what think at when you
indicate using a "shared context"; it can help to exchange data between
2 webapps, and so, after some implementation, to have this session
sharing. It's however requiring some implementation, to "map" the 2
sessions and to manage all other stuff (session timeout, etc). As you
Johnny, can be very messy.
To answert to you again, Johnny, my business need is to separate the
functionalities of a real UNIQUE application for a functional point of
view in 2 or + development artefacts, in order to facilitate
modularity. Let me precise: development modularity; we're ok for having
1 unique application at run time; because basically, this is it; all
modules "work together".
Jars are ok for the java code, we're missing another type of artefact
for the presentation code (jsp). A possible target is to have multiple
webapps, and to share a user's session across all of them. But another
possible solution is to "merge" all the development artefacts in 1 final
JEE webapp at build-time; because basically, separation is not required
at run time but at development time only.
So to say it simpler, the need is to be able to "package" JSP in
different 'artefacts' (wars ? jars ?) and however to allow them to
work with the same user information in the HTTP session.
Do you other solutions than 1) 2 webapps sharing session 2) merging webapps?
I'll give a look to Spring facilities if it covers this kind of thing.
see you - Dominique.
Johnny Kewl a écrit :
Always a big question... search the web and you find many different
approaches
Here is an article how to do it using servlet contexts...
http://www.fwd.at/tomcat/sharing-session-data-howto.html
But maybe clustering is what you looking for
Have a look at tomcat clustering and session replication.
Other popular approach is Apache JK_mod clustering and sticky
sessions.... my favorite
And then maybe what you really looking for is an application server...
Spring framework or something like Jboss.... something that lets you
share a bean.
Granted... they huge fat frameworks if thats all you want to do..
I think you need to qualify the question a little...
Are you just trying to share a session in a cluster... ie identicle
webapps -> Clustering
Or are you trying to share a bean across different webapps -> App server
Or are you trying to share a shared status across different webapps ->
App server singleton
Servlet contexts... can kinda do all of the above... but its kludgy...
think it can get very messy.
Good luck
----- Original Message ----- From: "Dominique
To: <users@tomcat.apache.org>
Sent: Sunday, April 08, 2007 11:09 PM
Subject: sharing same session across multiple webapp
Hi,
we'd like to make modular web development, not with merging in 1
deployable webapp separate web sources, but with making run 2 webapps
sharing the same user's session.
We all know JEE standard does not specify such thing for the moment,
but servers start to enable it a proprietary way (see weblogic 9 for
instance)
Is there a way in Tomcat to share the same user's session across
multiple webapps, for this purpose of modular development ?
Thank to any suggestion,
Dominique.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]