• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

downloading zip files  RSS feed

 
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........
 
Rancher
Posts: 42975
76
  • 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?
 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!