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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / bhaskar

Your answer 100% right

Is This Answer Correct ?    13 Yes 1 No

Post New Answer

More Servlets Interview Questions

What is a generic servlet?

0 Answers  


What is the use of httpservletresponsewrapper?

0 Answers  


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

0 Answers  


Can we use javascript in Servlets?

2 Answers   Wipro,


What is the major difference between servlet and applet?

0 Answers  






What are the difference between RMI and Servlets?

0 Answers  


What do you understand by mime type?

0 Answers  


Is dispatcher servlet a singleton?

0 Answers  


What is the difference between genericservlet and httpservlet

0 Answers  


What is servlet and how it works?

0 Answers  


What are the parameters of the service method ?

2 Answers  


When servlet object is created?

0 Answers  


Categories