I have created an AJAX Request of Post Nature.
Servlet code accepts the Post request and processes it. doPost() method writes the csv File to the responseStream .
This response should have been handled by the browser but when it reaches the success function of AjaxRequest, I just find my csv text embedded in an object.
Following below is the code:
console.log('we are success')'
console.log('we are failure')'
PrintWriter writer = response.getWriter();
Please suggest how to make sure, the file is downloaded ??? any ideas,