html5页面切换并返回值,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;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值