Well, I did that before without the struts framework and ran into problems:
I am working in frames so when I try to output specific contents then
it always defaults the contents to the frame source file contents. Also,
it would not allow me to set the default file name correctly.

Can I do it from an action class?


Bichiko, Dmitri wrote:

>you can set the content type from within the JSP page:
>
>response.setContentType("application/vnd.ms-excel")
>
>for the file name: 
>
>response.setHeader("Content-Disposition","attachment; filename=myfile.xls;")
>
>Dmitri
>
>-----Original Message-----
>From: Christian Pich [mailto:[EMAIL PROTECTED]]
>Sent: Monday, July 29, 2002 3:54 PM
>To: [EMAIL PROTECTED]
>Subject: upload files
>
>
>How does struts envision to send files (images, documents) to the web 
>user back?
>I could not find documentation about it? Is that done in the Action class?
>How do I set the contents-type, such as image/gif or others
>and how do I set the default name that appears for the user when he is 
>asked to
>save the file on his disk?
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to