This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: HTML Content being added when File download is written to response