session容器
session容器是用來管理存到session裡面的物件,而且也方便取出.
主要是為了管理方便. 實現了HttpSessionBindingListener的介面,可以對存入session和移出session做出監聽.
java 程式碼
- package org.langsin.computer.web.core;
- import java.util.Locale;
- import javax.servlet.http.HttpSessionBindingEvent;
- import javax.servlet.http.HttpSessionBindingListener;
- import org.langsin.computer.vo.User;
- public class SessionContainer implements HttpSessionBindingListener {
- private User user;
- private Locale locale;
- public Locale getLocale() {
- return locale;
- }
- public void setLocale(Locale locale) {
- this.locale = locale;
- }
- public User getUser() {
- return user;
- }
- public void setUser(User user) {
- this.user = user;
- }
- public void initialize(){
- user=new User();
- }
- public void cleanUp(){
- this.setUser(null);
- }
- public SessionContainer(){
- super();
- initialize();
- }
- public void valueBound(HttpSessionBindingEvent arg0) {
- // TODO Auto-generated method stub
- }
- public void valueUnbound(HttpSessionBindingEvent arg0) {
- // TODO Auto-generated method stub
- }
- }
相關文章
- "Spring 1.x無容器Session狀態支援"到底什麼意思?SpringSession
- laravel session 與 php session配置LaravelSessionPHP
- session和v$session說明Session
- memcached-session-manager session共享Session
- SessionSession
- Session分散式共享 = Session + Redis + NginxSession分散式RedisNginx
- session bean中的session如何理解?SessionBean
- 玩轉跟蹤(to owner session、other session)Session
- session switchSession
- session 共享Session
- Session案例Session
- cookie & sessionCookieSession
- cookie sessionCookieSession
- Cookies & SessionCookieSession
- Session 使用Session
- V$SESSIONSession
- Java SessionJavaSession
- kill sessionSession
- BDC SESSIONSession
- Cloud Foundry Session Affinity(Sticky Session)的實現CloudSession
- 【kill session】Oracle 徹底 kill session(轉載)SessionOracle
- 【Oracle】-【v$session】v$session的SNIPED狀態OracleSession
- 要 kill session 例子,session多,報錯如下Session
- v$session的blocking_session含義SessionBloC
- disconnect session和kill session的區別Session
- 從koa-session原始碼解讀session原理Session原始碼
- disconnect session和kill session的區別 轉Session
- 【轉】Session ID/session token 及和cookie區別SessionCookie
- Java同步容器和併發容器Java
- Oracle session traceOracleSession
- Session 簡介Session
- drools session理解Session
- session技術Session
- Session與CookieSessionCookie
- Session會話Session會話
- Spring SessionSpringSession
- cookie 和 sessionCookieSession
- session轉載Session