Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to maintain Session  RSS feed

 
rushikesh kale
Ranch Hand
Posts: 41
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Freinds!
In one interview interviewer ask me a question about "How to maintain a scope of session throughout the application?"
At that time I gave some wayword answer
So please give me some information about this.
Thanks in Advanced!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At that time I gave some wayword answer

Sounds like a wayward question.
Did he explain it at all?
 
sweta naidu
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i am not mistaken it maintains automatically throughout the application.
 
rushikesh kale
Ranch Hand
Posts: 41
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well My wayword answer was "If we dosen't initialize or create another new session then that session will maintain throuout" Then he ask me "How to retrive the value of first page on last page without storing it in a database?"
at that time I became clueless! So can you explain me this?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like he wanted you to explain how to bind objects (variables) to session scope and then retrieve them in another request.



http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html

Pay particular attention to setAttribute and getAttribute.
Understanding variable scoping is a pretty fundamental requirement in Servlet/JSP programming.
[ April 22, 2005: Message edited by: Ben Souther ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!