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

difference between forward and sendredirect

6 Answers   Accenture,


Which HTTP method is non-idempotent?

0 Answers  


What is the advantage of Servlets when compared with other server side technologies?

0 Answers  


can anybody send me j2ee softwares such as tomcat,weblogic server ,netbeans

2 Answers  


how many jsp scripting elements are there and what are those?

0 Answers  






waht is the main diference b/w servelts and JSP ?

8 Answers   CAP, HCL,


Can we override destroy method in servlet?

0 Answers  


How we can check in particular page the session will be alive or not

4 Answers   L&T, Symbiosis,


What are the methods in HttpSession and their use?

3 Answers  


Is there any differance b/w getting servlet context from servlet config and session? if yes then what is that?

7 Answers  


What are the different methods involved in the process of session management in servlets?

0 Answers  


What do you mean by chaining in servlet?

0 Answers  


Categories