What is the difference between using getSession(true) and getSession(false)
methods?
Answer
getSession(true) will check whether a session already exists for the
user. If yes, it will return that session object else it will create a new
session object and return it.
getSession(false) will check existence of session. If session exists, then it
returns the reference of that session object, if not, this methods will return
null.
|
More Servlets links
Answer - doGet() and doPost() are HTTP requests handled
by servlet classes..........
Answer - getSession(true) will check whether a session
already exists for the user..........
Answer - Servlets are Java based analog to CGI programs,
implemented by means of ..........
|
|