ITeye博客

javax.servlet.ServletException:Neither BindingResult nor plain target object解决方案

alloyer · 2010-02-09 01:44 · Spring · 企业架构 · Markdown

Spring MVC使用中出现如上异常:

javax.servlet.ServletException:Neither BindingResult nor plain target object for bean name 'xxx'available as request attribute 

解决方案:注意jsp页面中form中modelAttribute="xxx",xxx为须为ModelName的小写形式,如Model Product在jsp页面中应使用product作为modelAttribute。因为在form提交验证出错后,Model自动的request设置中,将采用如上规范。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。