问题
Is the ServletContext and Session object which we get from request object (HttpServletRequest) behave the same ?
回答1:
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.
来源:https://stackoverflow.com/questions/2076389/servletcontext-and-session-object