Thank Chris! I was able to use your suggested approach and got the browser to 
respond with a "Save as" dialog box.

The only strange thing that I noticed is that the filename sent back to the 
browser is not the one that I set on the header. Here's a code sample:

response.setContentType("text/x-vcard");
  |                             
  | response.setProperty("Content-Disposition", "attachment; filename=" + 
personDetails.getFirstName() + "_" + personDetails.getLastName() + ".vcf");
  | 
  | response.getPortletOutputStream().write(vCardData.getBytes());

Essentially the filename in the browser should be of the format: 
Firstname_Lastname.vcf

But instead the Portlet window name is used as the name of the file to be 
downloaded.

Any thoughts on why this might be occuring?

Thanks again for the help...much appreciated.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189847
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to