S2SH在loginAction里的login方法使用
ActionContext.getContext().getSession().put("userName", userName);
再把get("userName")打印出来,确实已经put进去了然后在loginAction里的editcode方法调用service类
userInfoService.updatecode(userCode, newuserCode)userInfoService的updatecode()是这样的
String userName = (String) ActionContext.getContext().getSession().get("userNa
me");这时ActionContext.getContext().getSession().get("userName")的返回值是null用IETester里的IE6去打开页面,就会得到null用myeclipse自带的浏览器去打开页面,用getSession().get能得到userName的值,但在update(User)的时候
就报错!
无法更新标识列 'id' 但我没有去更新标识列啊,只是更新了userCode而已啊~~~~~
ActionContext.getContext().getSession().put("userName", userName);
再把get("userName")打印出来,确实已经put进去了然后在loginAction里的editcode方法调用service类
userInfoService.updatecode(userCode, newuserCode)userInfoService的updatecode()是这样的
String userName = (String) ActionContext.getContext().getSession().get("userNa
me");这时ActionContext.getContext().getSession().get("userName")的返回值是null用IETester里的IE6去打开页面,就会得到null用myeclipse自带的浏览器去打开页面,用getSession().get能得到userName的值,但在update(User)的时候
就报错!
无法更新标识列 'id' 但我没有去更新标识列啊,只是更新了userCode而已啊~~~~~
解决方案 »
- 各位大神请进,救命啊~~!!
- linux下有没有64位的tomcat
- TimerTask也能算是一种线程吗?
- 100分求助,处理中画面
- extjs整合kindeditor老报KE未定义,该如何整合二者
- java.sql.SQLException: Network error IOException: Connection refused: connect 用的是Tomat连接SQLserver数据库的时候出现的错误
- 高分求助!如何实现动态表单或智能表单,工作流中可能经常用到
- 求助!myeclipse+xfire1.2.6 生成webservice
- EJB求救:无法建立关系!
- 简单问题相信大家一定知道
- <%@ include file="d:\\java\\filetest\\gbook.txt" %>总是找不到文件
- 空指针问题!
那就是要把用户修改密码的模块放在Jsp里了吗?不能用action来做?
ActionContext.getContext().getSession().put("userName", userName);
随即get出来是能得到值的。
而同样在这个action里的另一个方法 editcode()里,用:
ActionContext.getContext().getSession().get("userName");
还是空值啊~~~难道要在另一个action里调用get才能得到这个key的值?