在Java中,request怎样取session中的值?

设置seesion值:

session.setAttribute("userInfo", user);

在jsp里取:

User aa=(User)session.getAttribute("userInfo");

在java类里取:

request.getSession().getAttribute("userInfo");

# java  

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×