aspose file tools*
The moose likes Servlets and the fly likes How do download a file from a server using servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How do download a file from a server using servlet " Watch "How do download a file from a server using servlet " New topic
Author

How do download a file from a server using servlet

Bhasker Reddy
Ranch Hand

Joined: Jun 13, 2000
Posts: 176
I am executing a Stored PRocedure by passing the parameters
using JDBC and Java Servlets. After the execution, the stored procedure generates a data and that data is stored on oracle on unix. I want the ability to download that data(or file) onto
my local machine(user's local machine).
Do anyone has any code that does that or any ideas.
thanks


Bhasker Reddy
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

Every http response is a download, when it comes down to it. To make a page response be presented as a "save file" operation, you either choose a MIME type (Content-type) that has no display handler or set the Content-Disposition header.
Of course, a browser that doesn't handle Content-Disposition and has set a display option for that type won't save it, but there's only so much you can do...


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do download a file from a server using servlet
 
Similar Threads
Can I use Pure JSP Code without any java beans for a web application
Comparing data in 2 files in different folders
Calling JDBC or Stored Procedures(in Oracle), which is faster
Calling a Stored Procedures for Hibernate
Download a file from the server using Java Servlet