Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

downloading zip files  RSS feed

 
phani bhushan reddy
Greenhorn
Posts: 27
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please can anybody send me a sample example for downloading the zip files? I was tried out so many solutions but in tomcat server, it was showing as the file does not exists. Please send me a sample example.
Advance Thanks........
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way of downloading would be to put the file in a publicly accessible directory in the web hierarchy, and then put a link to it on a web page. Is that what you're doing? Or are you looking for a way to stream the ZIP file to the browser using a servlet?
 
Abdel Olakara
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Phani,

The easy way out is wat our friend mentioned above. You can host all the zip files in a location and create anchour tags in the HTMLs. Another way is to send the contents of the ZIP file as a binary stream as the output of the servlet. In this case remeber to set the content type appropriately and the rest.. the client browser will take care.

-- Abdel Olakara
http://technopaper.blogspot.com
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!