File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML Content being added when File download is written to response

 
surya naidu
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
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?
 
Tim Moores
Bartender
Posts: 2500
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic