--:--









Quiz for Session Management

Course: JAVA | Subject: Java | Topic: Servlets & JSP



Logo

Q1: Which interface is used for session tracking in servlets?

Logo

Q2: Which method is used to get the session object from the request?

Logo

Q3: Which method is used to invalidate a session?

Logo

Q4: How are sessions typically maintained between client and server?

Logo

Q5: What is the default timeout for a session in minutes?

Logo

Q6: Which method sets an attribute in session?

Logo

Q7: Which method retrieves an attribute from session?

Logo

Q8: What does session.isNew() return?

Logo

Q9: Which method returns the session ID?

Logo

Q10: How to set session timeout programmatically?

Logo

Q11: Which session tracking method appends session ID in the URL?

Logo

Q12: Which object is used to store session data on the server?

Logo

Q13: What happens if a session is not accessed before timeout?

Logo

Q14: What is the scope of session attributes?

Logo

Q15: Which method checks if the session exists without creating a new one?

Logo

Q16: Which of the following is not a valid session tracking technique?

Logo

Q17: What does setMaxInactiveInterval(-1) do?

Logo

Q18: Which file can set session timeout in minutes declaratively?

Logo

Q19: How can you remove a specific session attribute?

Logo

Q20: How can you check if session is still valid?

Are you ready to start test? Set your time limit