RequestContextAwareTag.java org.sprin
rk.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:86) ERROR - Neither BindingResult nor plain target object fo
ame 'loginForm' available as request attribute
java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'loginForm' available as request attribute
at org.springframework.web.servlet.support.BindStatus.
............
............
............
Solution
因為沒有指定 jsp form modelAttribute 所對應的物件
ex:
// Controller
public String login(Map
model.put("login", new new LoginForm());
}
// JSP
<form:form method="POST" modelattribute="login">
* Reference
- Neither BindingResult nor plain target object for bean name available as request attribute
- Spring MVC – Neither BindingResult Nor Plain Target Object For Bean Name ‘Xxx’ Available As Request Attribute.
沒有留言:
張貼留言