后台有个方法,里面部分代码如下:

System.out.print("alter:"+user.getId());
User temp=userservice.getUserByUserId(user.getId());
System.out.print(temp.getUsername());
ActionContext.getContext().put("temp", temp);
return "userAlter";

经过调试,temp对象是有值的,上面的代码也是正确的,但是如果我将 ActionContext.getContext().put("temp", temp);换乘 ActionContext.getContext().put("user", temp);,那么前端就无法显示内容。

前端代码:

信息修改: ${temp.id} ${temp.username }用户名:${user.username } 用户密码:${user.password }

这里面的问题,我不知道是什么原因。我猜应该是Put的键和由spring托管的那个user变量同名,可能spring无法处理之类的。。暂且这么理解吧!

最新文章

  1. 逆天通用水印支持Winform,WPF,Web,WP,Win10。支持位置选择(9个位置 ==》[X])
  2. codeforces 597C C. Subsequences(dp+树状数组)
  3. 说说markdown和latex的简单比较
  4. Pyqt 打开外部链接的几种方法
  5. android-数据存储之远程服务器存储
  6. 需要使用id内省方法--responsesToSelector: 的两个地方
  7. Cmd命令
  8. Java String类详解
  9. c#中进程的使用
  10. sessionStorage、localStorage、cookie
  11. GNU Make 学习系列一:怎样写一个简单的Makefile
  12. 九思老客户分享:部署OA办公系统的四大意义
  13. numpy数组、向量、矩阵运算
  14. asp.net -mvc框架复习(1)-ASP.NET网站开发概述
  15. CF198 div1 D - Iahub and Xors
  16. iOS刚进入后台接受推送、打开推送调转到相应的界面
  17. svn版本提交冲突问题解决详解
  18. 01-初识MySQL数据库
  19. The Apache HBase™ Reference Guide
  20. 使用mybatis中的自定义TypeHandler处理PostgreSQL中的Json类型字段

热门文章

  1. <Chapter 2>2-2-1.用户偏好模式(The User Preferences Pattern)
  2. sublime text 2使用经验
  3. 新建虚拟目录使用UNC共享文件夹(即:虚拟目录使用UNC共享文件夹)的方法 -摘自网络
  4. homework-07
  5. DelphiXE7操作sqlite数据库
  6. #elif
  7. Table 样式设置
  8. hibernate AOP
  9. 通过yum安装Nagios
  10. JavaWeb学习篇之----容器Response详解