aspose file tools*
The moose likes Servlets and the fly likes downloading the video Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "downloading the video" Watch "downloading the video" New topic
Author

downloading the video

saravanan ragunathan
Ranch Hand

Joined: Aug 02, 2010
Posts: 84

when i create the simple web application ..i tried to dwonload the video(.avi)
from tomcat by setting the content type as (video/quicktime) ..it gets downloaded
but my system shows it as unkown file format and the file name is very strange
is there any facility to include the file name and type with the response




"I Love Java Ranch"
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

an avi is mime-type "video/x-msvideo" http://www.w3schools.com/media/media_mimeref.asp
You can define the file name using
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Hi Saravanan,
i tried to download the video(.avi)

I see you are trying to download the video within your application. I'm not sure if you considered pros and cons of this way.
Pros:
1. No user intervention to download.
2. Fairly quick to download.
Cons:
1. Downloadable file size is limited.


You can also download by directly accessing the file from the server using "Get" request. Say if you want to download "sample.avi", then invoke http://<server-host>:<port>/<app-name>/<path>/sample.avi. This will prompt java script pop-up box in your application to download wherever you wish.
Pros:
1. Can download bigger files.
Cons:
1. User intervention is required.


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: downloading the video
 
Similar Threads
Assigning values in constructors with varargs
path issue regarding tomcat server
jdbc 3 problem with buttons
How to upload a file on webserver using midlet and servlet
Get File Type