wood burning stoves 2.0*
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
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: 49
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: 1648
    
    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
unable to call AOP method
spring 3.0 DTD issue
begining to ejb
Problem with @Transactional (Transaction is not getting rollbacked)