nerdexam
GIAC

GSNA · Question #257

Which of the following is a method of the HttpSession interface and is used to retrieve the time when the session was created?

The correct answer is A. getCreationTime(). The getCreationTime() method returns the time when the session was created. The time is measured in milliseconds since midnight January 1, 1970. This method throws an IllegalStateException if it is called on an invalidated session.

Design infrastructure solutions

Question

Which of the following is a method of the HttpSession interface and is used to retrieve the time when the session was created?

Options

  • AgetCreationTime()
  • BgetSessionCreationTime()
  • CgetSessionTime()
  • DgetTime()

How the community answered

(48 responses)
  • A
    85% (41)
  • B
    2% (1)
  • C
    8% (4)
  • D
    4% (2)

Explanation

The getCreationTime() method returns the time when the session was created. The time is measured in milliseconds since midnight January 1, 1970. This method throws an IllegalStateException if it is called on an invalidated session.

Topics

#HttpSession#session management#Java web API#web security

Community Discussion

No community discussion yet for this question.

Full GSNA Practice