为了账号安全,请及时绑定邮箱和手机立即绑定

action 中有返回值, 但是不知道这个返回值对应哪个 html 页面

action 中有返回值, 但是不知道这个返回值对应哪个 html 页面

慕妹3242003 2019-03-01 10:51:15
下面的代码是项目中的 action 的代码, 其中返回了 "complete_user_info" 这个字符串, 在 strut 中, xml 文件中会有对应的配置, 用来指明跳转到哪个 jsp 页面. 可是这个项目中, 我搜遍了整个项目, 就是找不到这样的配置文件, 全盘搜索"complete_user_info"这个字符串, 只有下面的代码出现这个字符串, 那么, 我想请问下, 下面的代码中, action 和 html 之间是如何关联起来的, 这个配置在哪里? 我自己的分析如下: 这个action 类已经使用 @RequestMapping 注解来映射url地址了, 理所当然就不会像 strut 一样使用 xml 文件来配置映射关系了, 那么 action 的返回值指明为'complete_user_info', 他跳转到哪个html 页面, 这个配置在哪里, 我如何找到? 附: 我看了下 web.xml , 项目中还用到了 freemaker。 @RequestMapping(value = "/completeUserInfo", method = RequestMethod.GET) public String completeUserInfo( HttpServletRequest request, HttpServletResponse ponse,Model model) throws Exception { String userid = (String) request.getSession().getAttribute("userid"); try { JSONObject obj = pingTaiService.queryUserInfo(request.getSession(),userid); String phone = (String) request.getSession().getAttribute("account"); model.addAttribute("phone", phone); //注册手机号 if(!obj.isEmpty()){ model.addAttribute("tag", "false"); //编辑用户资料 model.addAttribute("userInfo", obj.toString()); }else{ model.addAttribute("tag", "true"); //新增用户资料 model.addAttribute("userInfo", obj.toString()); } return "complete_user_info"; } catch (Exception e) { logger.error(e.getMessage()); } return null; }
查看完整描述

1 回答

?
万千封印

TA贡献1891条经验 获得超3个赞

complete_user_info.jsp
找下springmvc的资料看一下吧,关键词数据绑定,页面跳转

查看完整回答
反对 回复 2019-03-01
  • 1 回答
  • 0 关注
  • 559 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号