This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft 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 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply locked New topic
Author

code for downloading file in spring 3.0

rajareddya reddy
Ranch Hand

Joined: Jul 23, 2011
Posts: 42
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
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

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

http://gardiary.wordpress.com/2010/04/06/file-upload-and-download-using-spring-mvc/


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: code for downloading file in spring 3.0
 
Similar Threads
working Spring 3.0 dynamic web project template
begining to ejb
Problem with @Transactional (Transaction is not getting rollbacked)
spring 3.0 DTD issue
unable to call AOP method