I have generated excel report and i want the file to be downloaded by the user ,so how to set the response properties (content type) .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to set the headers and content type like this:
Then stream the content in the response.
Edit: If you need to set the content length:
Content length documented in the javadoc