[PJUG Javamail] downloading file from JEE server app to client
Chris Foster
cjafoster at gmail.com
Mon Aug 3 13:42:21 EDT 2009
As David stated, create a servlet to return the file data in the
response stream. But the key to making this work is setting the
content type. If you set the content type in the HttpResponse, the
browser will handle the file according to it's normal rules for that
type. In other words, if you set the content type properly, the
browser will treat your servlet like a normal file. Then you can
present a link to the file, do an Ajax call, or whatever.
- Chris
On Aug 3, 2009, at 9:07 AM, David Mirly <mirly at comcast.net> wrote:
>
More information about the Javamail
mailing list