Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

difference between request.getSession(false) or
request.getSession() and request.getSession(true)

Answer Posted / msreekanth2004

request.getSession(true) or request.getSession():
If session is present it returns that session. Otherwise
it'll create a new session and return that.

request.getSession(false):
If session is present it returns that session. Otherwise it
return "null"

Is This Answer Correct ?    45 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who is responsible to create the object of servlet?

1191


Is servlet thread safe?

972


Difference between GET and POST?

1135


Explain servlet life cycle?

1112


Tell us something about servletconfig interface.

982


Write a program to show the functionality of doget and dopost method?

1200


Why session tracking is needed?

1017


Explain the different ways for servlet authentication?

1081


What exactly is a servlet?

986


What is the default http method in the servlet?

1277


How to get the server information in a servlet?

1152


How do you configure a centralized error handler in servlets?

1092


What are the differences between the servletconfig interface and the servletcontext interface?

1165


What is difference between GenericServlet and HttpServlet?

1138


How to notify an object in session when session is invalidated or timed-out?

1073