存入session:
TbUser tbUser = userService.queryUser("[email protected]", "B84BF94BDD703627").get(0);
ActionContext ctx = ActionContext.getContext();
ctx.getSession().put("tbUser",tbUser);取session里的值:
ActionContext ctx = ActionContext.getContext();
TbUser tbUser = (TbUser)ctx.getSession().get("tbUser");
request.getSession().setAttribute();
request.getSession().getAttribute();这样也测试了, IE 能够取到tbUser的值, FF 和google不能,整个项目前面的代码都能取到,今天就不行了...蛋碎......来个高手指点一下...
TbUser tbUser = userService.queryUser("[email protected]", "B84BF94BDD703627").get(0);
ActionContext ctx = ActionContext.getContext();
ctx.getSession().put("tbUser",tbUser);取session里的值:
ActionContext ctx = ActionContext.getContext();
TbUser tbUser = (TbUser)ctx.getSession().get("tbUser");
request.getSession().setAttribute();
request.getSession().getAttribute();这样也测试了, IE 能够取到tbUser的值, FF 和google不能,整个项目前面的代码都能取到,今天就不行了...蛋碎......来个高手指点一下...
解决方案 »
- lucene paoding庖丁解牛对单个的汉字搜索、拆分问题(在开一帖)
- 求救。。。。JBOSS 部署JMS 。。。
- 怎么样实现servlet去读取.txt文档中的内容
- 急急急:请教一个Spring RMI的问题
- 请教一个MVC中的关于structs框架的入门练习的问题:
- Tomcat JK Connector 1.2.27 版本发布
- 急,判断一个字符串包含指定字符的函数?字符串包含函数
- 郁闷乱码的问题,不应该出问题啊!!偶快要哭了!!
- ***************一道面试题目**********[金字塔]************居然被他难倒了**************
- j2ee是不是就是用来开发网站的
- eclipse在线安装maven的问题
- VNC客户短短开发遇到的问题,懂rfb协议的高人进来
试过了,没用,ff 连cookie都清了,myeclipse 关了,机子重启了,没用...........在线等啊在线等..............
存和取是2个不同的action , session我在页面根本就没用到,只是在后天做插入数据的时候取session里的tbUser
HttpSession session = request.getSession();
session.setAttribute("xxx",xxx);
session.getAttribute("xxx");