java 控制器向页面传值方式

1.单个字符串 

@RequestMapping(value = "list", method = RequestMethod.GET)
public ModelAndView list(Integer investorApplyId) {
ModelAndView model = new ModelAndView(
"daybusiness/InvestorApplyDetail/list");
model.addObject("investorApplyId", investorApplyId);
return model;

}

这句 model.addObject("investorApplyId", investorApplyId);  是存接收到的值

前台页面 写法 : ${investorApplyId }

例子: 

<input type="hidden" style="float: left" value="${investorApplyId }" id="investorApplyId"
name="investorApplyId"></input>

 

posted @ 2016-07-29 20:48  秋香姑娘请你不要紧张  阅读(1315)  评论(0编辑  收藏  举报