SessionMap vs Map which is better for Session?

☆樱花仙子☆ 提交于 2019-12-02 03:13:27

The SessionMap is specifically designed for the purposes if you want to have access to the servlet session attributes. So, the user is able to keep a synchronized collection of objects in session and use it instead of HttpSession directly. This object is automatically injected by the servletConfig interceptor which is a part of the defaultStack if you implement SessionAware interface in the action class. As soon as you don't need to work with servlet session directly and don't have access to it you can at least invalidate a session that finalizes the collection of objects in it. A new session map required to action context if you want to continue to use a session.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!