亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

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 關注
  • 523 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號