[Springmvc]javax.servlet.jsp.jsptagexception:neither Bindingresult nor plain target object for bean

Source: Internet
Author: User

Problem Description:

When a page uses tags <form:form> commits, it appears [Springmvc]javax.servlet.jsp.jsptagexception:neither Bindingresult nor plain target An object for Bean exception.

Cause Analysis:

The,<form:form> tag has a default property commandname when the page is rendered, and its value defaults to "command". In fact, this command is the corresponding controller in the JavaBean. But the corresponding JavaBean name in my controller's method is not the command, but the user or account, and so on. So you want to display the name of the JavaBean whose CommandName value is "user" or you are using.

<commandName= "user"  action= " method=" Get ">    </form:form>

Workaround:

Familiarity with the rules of spring MVC or other tag libraries makes it easier to interact with the page and controller. (In fact, whether you use the spring tag or the jstl, the result of rendering is HTML, and there is nothing beyond the HTML category.) )

[Springmvc]javax.servlet.jsp.jsptagexception:neither Bindingresult nor plain target object for bean

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.