@responsebody Direct Conversion json__ large data in Java

Source: Internet
Author: User

The URL was not accessed today while writing the transmission data

http://127.0.0.1:8888/qchatv2/finduserpageinfo.do?pagination.start=440&pagination.pagesize=10& When the pagination.jsonpageno=1&pagination.pageno=45 was executed, it found 404 errors and found that when the Ajax was executed, the data had been executed in the action JSP receives no values when passing object values to the JSP page.


@RequestMapping ("/finduserpageinfo.do")
Public pagination Finduserpageinfo (Uumlogincheck uumlogincheck,pagination pagination) throws exception{

return pagination;
}

This results in pagination, as shown in the figure


The object returned directly to the JSP cannot be converted to JSON format

{"PageNo": Countno, "pageSize": "Jsonpageno": 1, "countsize": 444, "Start": 440, "End": 0, "resultlist": [{] LcId ": 123," Uumrole ": {" Roleid ":", RoleName ":" System Super Admin "," roletype ":" Public "," roledate ": 1375326222000," Rolelevel " : 1, "Sysmenu": null}]}

Ajax data to receive a value




The last query, the next SPRINGMVC has a note

@responsebody indicates that the return result of this method is written directly to the HTTP response body is typically
used when fetching data asynchronously, and after using @requestmapping, the return value is usually resolved to a jump path. After adding the @responsebody, the results are not resolved to the jump path, but are written directly to the HTTP response body. For example, you can get JSON data asynchronously and then return the JSON data directly after adding @responsebody.




To

@RequestMapping ("/finduserpageinfo.do")
Public @ResponseBody pagination finduserpageinfo (Uumlogincheck uumlogincheck,pagination pagination) throws exception{
Uumlogincheckservice.finduserpageinfo (uumlogincheck,pagination);
return pagination;
}



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.