I have this code:
<%
/* HKEY_CLASSES_ROOT\MIME\Database\Content Type */
response.setContentType("application/msword");
response.setHeader("Content-Disposition", "attachment; filename=\"" +
"prorroga.doc;" + "\"");
ServletOutputStream output = response.getOutputStream();
byte[] inBytes = new byte[128];
FileInputStream fileInputstream = new
FileInputStream("C:\\resin-2.1.4\\webapps\\intrama\\prorroga.doc");
int len = fileInputstream.read(inBytes);
while(len != -1) // Check for EOF
{
output.write(inBytes, 0, len);
len = fileInputstream.read(inBytes);
}
%>
but the word file is ouputed in the page (to bad)
I am using tiles to conform the page. but I think that this is not the
problem.
----- Original Message -----
From: "LFung" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, September 27, 2002 6:15 PM
Subject: Re: send file from action
> I mean download, I reach to open dialog (open / save)
>
> ----- Original Message -----
> From: "Joe Barefoot" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, September 27, 2002 3:08 PM
> Subject: RE: send file from action
>
>
> What do you mean by "send"? A download? via email?
>
> > -----Original Message-----
> > From: LFung [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 27, 2002 3:19 PM
> > To: [EMAIL PROTECTED]
> > Subject: send file from action
> >
> >
> > Hi:
> >
> > how can I implement an action to send a use a file, for
> > example a .doc file.
> >
> > thanks in advance.
> >
> > LFung.
> >
>
> --
> 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]>