nerdexam
GIAC

GSSP-JAVA · Question #93

Which of the following methods of the HttpSession interface can be called upon an invalidated session without throwing the IllegalStateException?

The correct answer is B. getServletContext(). See the full explanation below for the reasoning.

Question

Which of the following methods of the HttpSession interface can be called upon an invalidated session without throwing the IllegalStateException?

Options

  • AgetAttribute()
  • BgetServletContext()
  • CgetAttributesNames()
  • Dinvalidate()
  • EgetLastAccessedTime()

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    71% (17)
  • C
    17% (4)
  • E
    8% (2)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice