Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Content-Disposition inline/attachment

843841Dec 15 2006
I am using Content-Disposition for excel file download as below:

I have searched the forum but not able to get the exact answer or solution. Please also guide me to some url if possible.

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "inline; filename=xyz.xls" );

If I am using inline attribute but I am not able to specify the filename as xyz.xls and by default fileName provided by browser is the request URL(action-mapping in case of struts).

But it works fine with attachment attribute and prompts for the exact file Name and works fine.

I want to know how to specify the desired fileName with inline Attribute ? I am using the struts based request for Excel file generation.

Best Regards,
Amber Gupta
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2007
Added on Dec 15 2006
0 comments
424 views