• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Servlet creating zip file for download

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
:-)
reply
    Bookmark Topic Watch Topic
  • New Topic