Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic question regarding predefined-variable: session

 
Rudy Rusli
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm trying to understand the difference between predefined-variable "session" with "request.getSession()".

I read the API and it says something like this for request.getSession():
"Returns the current session associated with this request, or if the request does not have a session, creates one."

I don't understand when I have to call request.getSession() and when I just need to use predefined-variable "session".

Thanks for the advice.
~ Rudy ~
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are one and the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic