You need to do something like:
<%
response.setHeader("Content-Disposition"," attachment;
filename="+"whatever.xls");
%>
"Jonathan Mast" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am writing a report generator that has the ability to generate Excel
> files. The user clicks on a link (exporter.jsp), the page's content-type
> has been set to "application/vnd.ms-excel" which naturally prompts the
> user
> to either save to a file or open directly in Excel.
>
> It works fine, but requires the user to manually rename the generated file
> from "exporter.jsp" to "whatever.xls". Furthermore, Firefox will not let
> you rename the file in save dialog box, it just automatically saves the
> file
> as "exporter.jsp", you must rename it from the file browser.
>
> How do specify the output file name from within JSP?
>
> Btw, right clicking and selecting "save link as" allows for specifying the
> file name, but the file that is created is empty.
>
> Thanks
>
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]