File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills 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
Author

sendRedirect and saving Session variables

Roger Studner
Greenhorn

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 ?

Thanks,
Roger Studner
Ben Souther
Sheriff

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é
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Maybe this thread will help you:
http://www.coderanch.com/t/86023/Tomcat/RequestDispatcher-foward-cross-web-application


[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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: sendRedirect and saving Session variables