`

url上传参数

阅读更多
[size=large]
@RequestMapping(value = "/event/{id}", method = RequestMethod.GET)
	public String detail(HttpServletRequest request,@PathVariable Long id) {
		Event event = eventManager.getEventByEventID(id);
		request.setAttribute("event", event);
		return "/event/event_detail";
	}



前台jsp页面传参
<c:forEach items="${dd}" var="dd" varStatus="status">
							<li style="color: #0080C0;">
								<span>第${status.count}阶段&nbsp;</span>
								<a href="<c:url value='/event/${status.count}'/>">${dd}</a>
							</li>
						</c:forEach>
@RequestMapping(value = "/event/{bid}")
	public String showRootBand(@PathVariable(value = "bid") int bandId,
			ModelMap model) {}
[/size]
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics