SPRINGMVC binding Pojo Failed issue

Source: Internet
Author: User

In the process of transmitting parameters to the front-end table one-way back-end controller, it is found that the attribute value of Pojo is the default value, or null or 0.0 on the internet, and a lot of data has been looked up on the net, and the high demand is that the PO class has no get set method, and the front JSP page contains enctype= " Multipart/form-data ", binary transfer will make Pojo bound to null, nonsense not to say to see my wrong reasons:

Look at the debug console through the HttpServletRequest obtained by the Pojo is really no parameters, it is mistaken for parameter binding is not successful, mistakenly think that the value of the front end is the default data type value.

The values inside are empty;


It is because of the configuration of JSP I have a headache;


If it is configured as above, the attribute of name is consistent with the variable name of Java class, it will be fine, OK, go home to the Sao years.

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.