Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Common Session between 2 application in tomcat server

 
Nithish Yalamanchili
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai All

I have 2 web applications in tomcat server. When i login from first webapplication it goes to Index page, in that page we give a link to some action in 2nd application. what we need is common session which we cant achieve sharing common session object. Is it possible by cross context in server.xml of tomcat. If so how its possible. help me out....

Nithish
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, per the servlet spec, sessions are by user, by context.
In other words, each context has a separate session for each user.

There are ways to share information between contexts in Tomcat but they are not necessarily spec compliant; meaning the code may not work the same way in another container.

See:
http://wiki.apache.org/tomcat/HowTo#head-676687dc9e14f16a2dbe0e207447803a757198ac
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic