“ Bean name 'relationForm' 的 BindingResult 和普通目标对象都不能用作请求属性” 我对上面的错误有一些问题,我将在此处发布代码的重要部分。
感谢你们的任何想法controller.java
@RequestMapping(value = "addremoverelation/{caseId}", method = RequestMethod.POST)
public ModelAndView addRelation( @ModelAttribute("relationForm") CaseCompleteForm ccf,
@PathVariable Long caseId,HttpServletRequest request, BindingResult result) {
//my code
}
jsp 文件
<form:form action="${pageRoot}case/addremoverelation/${caseBase.id}" method="post" id="CaseCompleteForm" modelAttribute="relationForm"> <div>....</div>