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
Can filter be used as request or response?
When servlet is loaded?
Why session tracking is needed?
Explain the role of dispatcherservlet and contextloaderlistener.
Which interface should be implemented by all servlets?
What’s the difference between forward() and sendredirect() methods?
What are sessions in servlets?
What are different ways for authentication of servlet?
What must be implemented by all servlets?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
Write the code to get the server information in servlet.
What is the effective way to make sure all the servlets are accessible only when user has a valid session?
What are the advantages of cookies?
What are important features of Servlet 3?
What is the servletconfig object?