Hi! I want to download files from a server using JSP. I managed to do it only with txt files, but I would like to be able to download any kind of file. Can you please help me? Thanks.
PS Maybe this is not a JSP but a J2SE question. But I thought there might be some JSP feature that can help.
-
Download files with JSP (4 messages)
- Posted by: d gij
- Posted on: February 07 2003 10:51 EST
Threaded Messages (4)
- Download files with JSP by Bharat Gandhari on February 07 2003 13:47 EST
- Download files with JSP by Bharat Gandhari on February 07 2003 13:50 EST
- Download files with JSP by Craig McDaniel on February 07 2003 14:27 EST
- Download files with JSP by Mark Monster on February 11 2003 06:59 EST
-
Download files with JSP[ Go to top ]
- Posted by: Bharat Gandhari
- Posted on: February 07 2003 13:47 EST
- in response to d gij
You can download any file by giving a link to the resource (file). I don't see any reason why the download shouldn't work for other file types if it works for text files. -
Download files with JSP[ Go to top ]
- Posted by: Bharat Gandhari
- Posted on: February 07 2003 13:50 EST
- in response to d gij
Try the following to write the output to an excel sheet..
response.setContentType("application/vnd.ms-excel");
similarly you can write the output to word and other formats. -
Download files with JSP[ Go to top ]
- Posted by: Craig McDaniel
- Posted on: February 07 2003 14:27 EST
- in response to d gij
You should also check out the getMimeType() function in javax.servlet.ServletContext -
Download files with JSP[ Go to top ]
- Posted by: Mark Monster
- Posted on: February 11 2003 06:59 EST
- in response to Craig McDaniel
GetMimeType didn't work for me when using JRun 3.x.