bugs 大集合

Neither Errors instance nor plain target object for bean name “inspPlanForm”

這個問題的產生原因是
public ModelAndView Enter(HttpServletRequest request,
HttpServletResponse response,InspPlanForm inspPlanForm) {

ModelAndView mav = new ModelAndView("EnterView","inspPlanForm",inspPlanForm);
return mav;

}
return中沒有包括"inspPlanForm",inspPlanForm這個模型。


2,
報Tag <spring:input...../>出錯,也是因爲返回到這個jsp關聯的ModelView沒有返回XXXXform 參數,所以<spring:input path=".."/>在數據綁定時就會出錯。

3.
JSP中
<input type="file" name="inspPlanA" />
ACTION中
MultipartFile file = mRequest.getFile("inspPlanA");
文件名對應,但是不要在form中進行數據綁定,因爲file得到的是二進制流,不是string。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章