Interview Questions

Which of the statements below is true for a web application using session management?

BEA WebLogic Questions and Answers


(Continued from previous question...)

Which of the statements below is true for a web application using session management?

Which of the statements below is true for a web application using session management?
a.) The session object is invalidated, when the session times out.
b.) The session object is invalidated, when sessionInvalidate() method of HttpSession is invoked.
a. Both of the above statements are true.
b. Only statement a.) is true.
c. Only statement b.) is true.
d. None of the above statements is true.


B is the correct choice. The session object will become invalid in either of the following scenarios:
a.) When the session times out.
b.) When invalidate() method of the HttpSession interface is invoked.
Please note that invalidate() and not sessionInvalidate() is the method of HttpSession interface. Thus choice B is correct.

(Continued on next question...)

Other Interview Questions