---
title: "javax.servlet.ServletException:Neither BindingResult nor plain target object解决方案"
author: "alloyer"
date: "2010-02-09T01:44:21Z"
tags: []
categories: ["企业架构"]
slug: "javax-servlet-servletexception-neither-bindingresult-nor-plain-target-object"
draft: false
lastmod: "2010-02-09T01:48:21Z"
id: 591822
url: "https://alloyer.iteye.com/blog/591822"
---

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

```java
javax.servlet.ServletException:Neither BindingResult nor plain target object for bean name 'xxx'available as request attribute 
```

解决方案：注意jsp页面中form中modelAttribute=&quot;xxx&quot;，xxx为须为ModelName的小写形式，如Model Product在jsp页面中应使用product作为modelAttribute。因为在form提交验证出错后，Model自动的request设置中，将采用如上规范。