struts+hibernate+spring 整合中出現的問題

acool發表於2008-04-18

我在專案中運用了Struts+hibernate+spring 架構進行開發,為此我配置了opensessioninview,但是令出奇的是,我做了個使用者登入驗證,比如說,我查詢資料庫中是否有這個使用者,有我就把它放到request.getSession.setAttribute(“user”,user);

但是但我,在別的地方想那出HttpSession中的user時,也就是request.getSession.getAttribute("user")時得到的確實空值,而且session的id還是不同的Id,這到底時什麼回事


謝謝!

相關文章