user241924
user241924

Reputation: 4438

ServletContext and Session object

Is the ServletContext and Session object which we get from request object (HttpServletRequest) behave the same ?

Upvotes: 1

Views: 1685

Answers (1)

cletus
cletus

Reputation: 625077

Sessions are user specific.

Servlet contexts are essentially global (within the context of that servlet), meaning all users who hit that servlet will share the same servlet context.

Upvotes: 5

Related Questions