Passing JSP parameters to spring controller
I am having issues with passing values between jsp to controller..
my home.jsp includes another file check.jsp..
<jsp:include page="check.html" flush="true">
<jsp:param name="param1" value="1" />
<jsp:param name="param2" value="expert" />
<jsp:param name="param3" value="skill"/>
</jsp:include>
and here is the controller...
@RequestMapping(value="check", method = RequestMethod.GET)
public String checkList(ModelMap modelMap, HttpServletRequest request){
Map<String, String> map = new HashMap<String, String>();
map.put("param1",request.getParameter("param1"));
map.put("param2",request.getParameter("param2"));
map.put("param3",request.getParameter("param3"));
modelMap.addAllAttributes开发者_开发问答(map);
return "checklist";
}
but I can't get the values in controller.. I mean all param values are null in the controller.. How to get these values?
- check != check.html
- include != GET
That's why your params are empty.
精彩评论