Which of the following statements is true about the Digest Authentication scheme?
The getSession() method of the HttpServletRequest interface returns the current session associated with the request, or creates a new
session if no session exists. The method has two syntaxes as follows:
public HttpSession getSession(): This method creates a new session if it does not exist.
public HttpSession getSession(boolean create): This method becomes similar to the above method if create is true, and returns the
current session if create is false. It returns null if no session exists.
Answer B is incorrect. The getSession(false) method returns a pre-existing session. It returns null if the
client has no session
associated with it.
Answer A and E are incorrect. There is no such method as getNewSession() in Java.
Carey
3 months agoMiss
2 months agoKing
2 months agoTheola
2 months agoWade
3 months agoAndra
2 months agoAlesia
2 months agoMerrilee
2 months agoTrevor
3 months agoGeoffrey
2 months agoSheron
3 months agoMartha
3 months agoPete
4 months agoIn
2 months agoIn
2 months agoIn
2 months agoSheridan
4 months agoCarlton
4 months agoRicarda
4 months agoCraig
4 months ago