This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Basic question regarding predefined-variable: session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Basic question regarding predefined-variable: session" Watch "Basic question regarding predefined-variable: session" New topic
Author

Basic question regarding predefined-variable: session

Rudy Rusli
Ranch Hand

Joined: Jun 01, 2006
Posts: 114
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

Joined: Jan 10, 2002
Posts: 60785
    
  65

They are one and the same.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Basic question regarding predefined-variable: session
 
Similar Threads
HttpSession invalidate not working?
Session Problem
Sometimes Session is Lost in Ajax Call
Regarding session in JSPs, a question from Enthuware Mock Exam
Who Creates the HttpSession , User or Weblogic