猿问

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

下面的代码是项目中的 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;
        }
慕妹3242003
浏览 562回答 1
1回答

万千封印

complete_user_info.jsp找下springmvc的资料看一下吧,关键词数据绑定,页面跳转
随时随地看视频慕课网APP

相关分类

Java
我要回答