今天的收获
来源:互联网 发布:淘宝装修怎么弄全屏 编辑:程序博客网 时间:2024/06/16 20:04
前台jsp页面点击“个人信息修改”按钮后,页面跳转到个人信息修改页面的过程:
1、前台jsp页面代码如下:
<div class="exitlogin_cc"> <a class="leave_the_page" href="${ctx}/login/updateinfo.htm">个人信息修改</a> </div>
2、点击后系统会请求到action的带有@RequestMapping("/updateinfo.htm")注解的方法中
3、系统会读取这个方法后返回前台页面ModelAndView,ModelAndView的路径就是要跳转的个人信息修改页面
@RequestMapping("/updateinfo.htm") public ModelAndView updateUserInfo(HttpServletRequest request, HttpSession session) throws Exception { SecurityContext securityCtx = SecurityContextHolder.getContext(); Authentication auth = securityCtx.getAuthentication(); if (auth == null) { throw new Exception("登陆之后才能修改"); } else { ProUser user = (ProUser) this.getUserInfo(); TProUser proUser = this.proUserService.getUser(user); session.setAttribute(Constant.LOGIN_PRO_USER_KEY, proUser); return new ModelAndView("login/blue/updateuserinfo"); } }
为什么不能直接在第一个jsp中设置超链链接到第二个jsp页面中呢?
因为系统必须做判断,判断当事人是否已登录
阅读全文
0 0
- 今天的收获
- 今天的收获
- 今天的一些收获
- 今天的收获-MindManager
- 今天收获的知识。。。。。。
- 今天的编程收获
- 今天的收获哈
- 今天一天的收获
- 今天的小收获!!
- 今天的收获....
- 今天的一些收获
- 今天的收获
- 今天的收获
- 今天的收获
- 今天的收获
- 今天的收获
- 今天的收获
- 今天的收获
- js中的map()方法
- 字符串替换
- sql之left join、right join、inner join的区别
- Mysql中子查询的常用语句
- 【Twitter Storm系列】flume+Kafka+Storm+HDFS 实时系统搭建
- 今天的收获
- Android ContentProvider
- git pull :因为文件冲突pull失败
- PHP实现异步调用方法研究与分享
- Java实现-搜索二维矩阵II
- python----socket(一)
- 关于LVM管理PVcreate过程中错误Device /dev/sdb not found (or ignored by filtering)
- c++string的深拷贝
- Java实现-翻转链表2