I have a servlet in which I want to download a file at the end
I have code which gets the response and writes a Bytearray to the response
I am able to Download the file which is written,However there is some HTML content being appended at the end.
The HTML content which is being appended is the header and footer of the application
Is there anyway i can filter out this data,Any suggestion?
The solution isn't to remove that HTML, the solution is to not send it in the first place. You need to ensure that file downloads are not being being handled the same way as page requests, i.e. that no header and footer is sent for them.
You have to be odd to be #1 - Seuss. An odd little ad: