permaculture playing cards*
The moose likes Servlets and the fly likes How to Dwonload a file using JSP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to Dwonload a file using JSP?" Watch "How to Dwonload a file using JSP?" New topic
Author

How to Dwonload a file using JSP?

Kalpesh Desai
Greenhorn

Joined: Jul 23, 2001
Posts: 4
Hello Sir/Madam,
I'm doing a Upload/DownLoad file functionality using JSP.
I used the com.oreilly.servlet.MultiPArtRequest class to upload the file on the Server.But I don't know how to download this file using JSP.
A simple solution to this to open the file in the Browser or run an application separately on the client machine to open the file.This option works with IE but this doesn't work with Netscape Navigator.
Next option is to store the file as BLOB object in database while Upload and use the OutputStream class to read this object while Download.But i have a restrictions on use of BLOB,thus can't use it.
Other solution for this is to use the OutputStream class to download the file directly from server.But I don't know how to use it in the JSP to download a file at the client using OutputStream.
Can anybody help me on this with a sample code.
Thanks and Regards,
Kalpesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Dwonload a file using JSP?