difference between request.getSession(false) or
request.getSession() and request.getSession(true)
Answers were Sorted based on User's Feedback
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 |
Does servlet have main method?
Why doesn’t a servlet include main()? How does it work?
What is the difference between the include() and forward() methods?
Is servlet thread safe?
Why do we need servlet filter?
How native code can be used in a servlet?
Can we use servlets in JavaScript?
What type of protocols are used in HttpServlet?
What is meant by Servlet? What are the parameters of service method?
Can filter be used as request or response?
What are the different methods of session management in servlets?
What are the common methods that are included in the http servlet class?