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

Can filter be used as request or response?

971


When servlet is loaded?

1079


Why session tracking is needed?

1029


Explain the role of dispatcherservlet and contextloaderlistener.

1195


Which interface should be implemented by all servlets?

1217


What’s the difference between forward() and sendredirect() methods?

1016


What are sessions in servlets?

1066


What are different ways for authentication of servlet?

1089


What must be implemented by all servlets?

1103


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

1033


Write the code to get the server information in servlet.

1065


What is the effective way to make sure all the servlets are accessible only when user has a valid session?

1062


What are the advantages of cookies?

1126


What are important features of Servlet 3?

1094


What is the servletconfig object?

1045