java代码?
@RequestMapping(value = “imageHandle/{id}”, method = RequestMethod.GET)
public String imageHandle(@PathVariable(“id”) Integer id,Model model) {
model.addAttribute(“a”,”1″);
model.addAttribute(“img”, id);
return “front/index”;
}
url:http://localhost:8080/daoqi/oa/imageHandle?id=1
jsp:<body>
hello!
<p>${a}</p>
<p>${img}</p>
</body>
jsp为什么404?
————————————————————————————————-
假如
@PathVariable(“id”) String id
url:
http://localhost:8080/daoqi/oa/imageHandle/id=”1″
可以跳转页面,并显示参数
jsp:
hello!
1
id=”1″
跪求,高手!
@RequestMapping(value = “imageHandle/{id}”, method = RequestMethod.GET)
public String imageHandle(@PathVariable(“id”) Integer id,Model model) {
model.addAttribute(“a”,”1″);
model.addAttribute(“img”, id);
return “front/index”;
}
url:http://localhost:8080/daoqi/oa/imageHandle?id=1
jsp:<body>
hello!
<p>${a}</p>
<p>${img}</p>
</body>
jsp为什么404?
————————————————————————————————-
假如
@PathVariable(“id”) String id
url:
http://localhost:8080/daoqi/oa/imageHandle/id=”1″
可以跳转页面,并显示参数
jsp:
hello!
1
id=”1″
跪求,高手!
解决方案
40