jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes sendRedirect and saving Session variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "sendRedirect and saving Session variables" Watch "sendRedirect and saving Session variables" New topic

sendRedirect and saving Session variables

Roger Studner

Joined: Aug 26, 2005
Posts: 6
I'm running jboss with embedded tomcat (if that is the correct way to say that).

I am trying to use sendRedirect (with or without encodeUrl, tried both) to go from one web app, to another web app.

I'm hoping to have things saved on the Session saved (userId etc) so that 2nd web app has a clue WHO you are, without having to login again.

I've read about crossContext and such, but find it very hard to get documentation involving jboss w/ embedded tomcat.

Anyone have any ideas ?

Roger Studner
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Sessions stick to the context in which they were created.
Tomcat does have a single signon feature but your sessions do not get carried from context to context.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Maybe this thread will help you:

[My Blog]
All roads lead to JavaRanch
pawank gupta
Ranch Hand

Joined: Jun 07, 2006
Posts: 34
AS ben mention that session stick to context but u can try it

bcause tomcat5 give the facility for single sign on by which u can do.

r second option is clustering.
I agree. Here's the link: http://aspose.com/file-tools
subject: sendRedirect and saving Session variables
It's not a secret anymore!