首页 > 编程语言 > 详细

springmvc 错误:Neither BindingResult nor plain target object for bean name 'command' available as request attribute

时间:2017-01-14 13:45:44      阅读:720      评论:0      收藏:0      [点我收藏+]

原因:springmvc默认页面回显,必须在页面的请求域里面添加对应的bean 默认的bean name为command

 

解决:

在handler里面添加一个对应的bean

map.put("employee", new Employee());

在页面上使用

<form:form action="emp" method="POST" modelAttribute="employee">

 

springmvc 错误:Neither BindingResult nor plain target object for bean name 'command' available as request attribute

原文:http://www.cnblogs.com/hy87/p/6285037.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!