Bear Bibeault wrote:You still haven't shown us the code.
<%
String filename = "C:\\uploaded-download\\anjane.mov"; //my own filename
//you can write
http://localhost
//String filepath = "C:/"; //located on Local C harddisk
BufferedInputStream buf = null;
try {
File myfile = new File( filename);
//set response headers
response.setContentType("application"); //I want to play a video file
response.addHeader(
"Content-Disposition", "attachment; filename=" + filename);
response.setContentLength((int) myfile.length());
FileInputStream input = new FileInputStream(myfile);
buf = new BufferedInputStream(input);
int readBytes = 0;
//read from the file; write to the ServletOutputStream
while ((readBytes = buf.read()) != -1) {
out.write(readBytes);
}
} catch (IOException ioe) {
} finally {
}
%>
Hi Bear Bibeault, Please check this.