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
Who is responsible to create the object of servlet?
Is servlet thread safe?
Difference between GET and POST?
Explain servlet life cycle?
Tell us something about servletconfig interface.
Write a program to show the functionality of doget and dopost method?
Why session tracking is needed?
Explain the different ways for servlet authentication?
What exactly is a servlet?
What is the default http method in the servlet?
How to get the server information in a servlet?
How do you configure a centralized error handler in servlets?
What are the differences between the servletconfig interface and the servletcontext interface?
What is difference between GenericServlet and HttpServlet?
How to notify an object in session when session is invalidated or timed-out?