Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getSession

 
ahamed irshad
Ranch Hand
Posts: 31
C++ Notepad Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone explain me request.getSession() with a simple example?thanks in advance
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What specifically don't you understand? And what would an example look like other than setting a reference to it?
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets go:
with

you get a new session if doesnt exists.

If you do

if the session doesn't exist it wont creat one.

You can use session to store objects to navigate beetwen the requests. Like an user attribute.

C ya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic