A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
HttpSession()
Chidanand Chauhan
Ranch Hand
Joined: Nov 10, 2005
Posts: 77
posted
Dec 01, 2005 04:11:00
0
If we use
HttpSession
session=request.getSession();
Then it will return the new session whether there is any other pre-existing session or not.
If i do
HttpSession
session=request.getSession(false)
then itwill return either null or the pre-existing session.
I suppose.
Please comment whether i am right or not...................
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
I like...
posted
Dec 01, 2005 04:20:00
0
The first place I would go to check this is the API:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html#getSession()
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html#getSession(boolean)
Java API
J2EE API
Servlet Spec
JSP Spec
How to ask a question...
Simple Servlet Examples
jsonf
I agree. Here's the link:
http://aspose.com/file-tools
subject: HttpSession()
Similar Threads
cookies and URL rewriting
session isnew()
Session Related Question
Doubt on session() and session(false)
Session
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter