I try to download a file. The action is triggered by ajax()
POST request. The request sends data in JSON format to the controller. The controller gener
Ajax is not going to help you try with hidden form approach
pass you json through form field on click of of your download button submit form
$('#formid').submit();
then in server side
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=filnemae.fileformat");
ServletOutputStream out = res.getOutputStream();
write on ouput stream then close or flush
if you are sending large data through post update postsize in server.xml