🎴 Flashcard Mode

Java Enterprise Architecture Quiz - Patterns, Spring, and Servlets

Card1 / 20
Mastered0
Review0
QuestionClick to flip

Attributes bound into session are available to any other servlet that belong to the same ServletContext?

AnswerClick to flip back
A
True
💡 Explanation:

Session attributes are shared across all servlets within the same ServletContext (web application). When you store an attribute in an HttpSession using setAttribute(), any other servlet in the same application can retrieve it using getAttribute() on the same session (identified by the same session ID). This sharing is a key purpose of session attributes - to maintain user-specific state across multiple servlets/JSPs in the application. Different ServletContexts have separate session scopes.

Change Mode