• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet creating zip file for download  RSS feed

 
marek duda
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there
i have a problem creating a Servlet which creates a zip file
generating the zipfiles works fine , but when it is generated the browser
prompts with file savedialog: Save File ZipServlet.txt?
in my ZipServlet I have following lines:
String zipFileName = "Images.zip";
response.setContentType("application/zip");
response.setHeader("Content-Disposition","attachment;filename="+zipFileName+);
Mozilla even opens the zip File in the browser window.
Where can i get the right content types and headers?
greeting
Marek
 
marek duda
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out what the Problem is!
it is very important that the lines

are in front off


that's all!
:-)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!