Meaningless Drivel is fun!
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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
jQuery in Action, 3rd edition