This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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!