Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to navigate Session obj. from one jsp to other

 
Shyam Singh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to navigate Session obj. from one .jsp to other[/b] .... we cannot add it to request attribute.

senario -->

1st.html --> 1st.jsp -- > sendRedirect() --> 2nd.html --> 2nd.jsp --> so On .

I want to contiue the session all along ..

please help ... New to Jsp
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Create a Session upon the user login . it will available to all your jsp and servlets. read this
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shyam Singh wrote: .... we cannot add it to request attribute.


never add a session object to the request scope ... it simply doesn't make any sense. Request scope only lasts until a request has completed and the response has been sent to the user.
session scope lasts as long as the user remains active over multiple requests.
 
PrasannaKumar Sathiyanantham
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As soon as an user connects to the server through a browser, a session is created and the session lasts until the user finishes his transaction or the browser is closed or a particluar time is set for session lifetime...

So there is no need to worry about what happens to the session if the user moves from one page to the next............

only the request object will persist for that particular request only.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic