[jboss-user] [JBoss Portal] - Re: Downloading a File from within a Portlet.

analyzediz do-not-reply at jboss.com
Fri Nov 14 11:30:00 EST 2008


Thanks Chris, for responding to the post.

I have looked at the spec and also tried to use the serveResource() method. The issue that I'm having is that changing the content type of the ResourceResponse object to the desired type (in this case a vCard with mime type of text/x-vcard), and streaming the content back to the client doesn't initiate a download of the vCard. It merely sends the result back as text and it's embedded into the browser. 

>From my understanding of how to force the browser to initiate a download, i will have to set the response header of "Content-Disposition" with an attachment parameter to let the browser bring up a "Save As" dialogue or launch the target application.

Any thoughts, or am I totally off base?

Thanks again. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189450#4189450

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189450



More information about the jboss-user mailing list