File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes code for downloading file  in spring 3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply locked New topic

code for downloading file in spring 3.0

rajareddya reddy
Ranch Hand

Joined: Jul 23, 2011
Posts: 61
There is a lot upload examples, but I couldn't find any for download. I'm using Spring 3.0 and I need to generate some text buffer and then let user download it as a file.

Please help to post code .
Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

Make sure you are setting your headers and ContentType, contentLength etc on your HttpResponse. I found this example with a quick google search.

[How To Ask Questions][Read before you PM me]
I agree. Here's the link:
subject: code for downloading file in spring 3.0
It's not a secret anymore!