• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to maintain Session

 
Ranch Hand
Posts: 41
Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

At that time I gave some wayword answer


Sounds like a wayward question.
Did he explain it at all?
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic