I'll have to look at this more closely later.  I have no trouble with
microsoft docs.

On 1/18/06, temp temp <[EMAIL PROTECTED]> wrote:
>
> I tried   content type as application/msword   but it did not help .Any
> other  ways to solve this problem?
> thanks & regards
>
>
> Note: forwarded message attached.
>
> ------------------------------
> Yahoo! Photos
> Got holiday prints? See all the 
> ways<http://us.rd.yahoo.com/mail_us/taglines/holidayprints/*http://pa.yahoo.com/*http://us.rd.yahoo.com/mail_us/taglines/photos/evt=38089/*http://pg.photos.yahoo.com/ph//print_splash>to
>  get quality prints in your hands ASAP.
>
>
>
> ---------- Forwarded message ----------
> From: Dakota Jack <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <user@struts.apache.org>
> Date: Wed, 18 Jan 2006 07:35:39 -0800
> Subject: Re: file download problem
> Just a thought.  Isn't there a specific content type for .doc
> documents?  That might solve your problem.I looked it up.  .doc
> documents are "application/msword".  Try that and see what happens.  I
> am actually building a list of all the extensions and their content
> types.  Hope this helps.
>
> On 1/18/06, temp temp <[EMAIL PROTECTED]> wrote:
> >  I am using struts action class to download a file .
> >
> >
> >   Here is the action class
> >
> >       public ActionForward execute(ActionMapping aActionMapping,
> ActionForm aActionForm,
> >                HttpServletRequest aHttpServletRequest,
> HttpServletResponse  aHttpServletResponse)
> >               throws Exception {
> >
> >           aHttpServletResponse.setContentType
> ("application/octet-stream");
> >           aHttpServletResponse.setHeader("pragma", "no-cache");
> >           aHttpServletResponse.setHeader("Cache-Control","cache");
> >           aHttpServletResponse.setHeader
> ("Cache-Control","must-revalidate");
> >
> >           Integer aSysAttachId = new Integer(
> aHttpServletRequest.getParameter(IWeb.SYS_ATTACH_ID));
> >            aHttpServletResponse.setHeader("Content-Disposition",
> "attachment;  filename=\"" +aHttpServletRequest.getParameter(
> IWeb.FILE_NAME)+ "\"");
> >            download(
> aApplicationInfoDelegate.getApplicationAttachemntFile
> (aSysAttachId),aHttpServletResponse);
> >           return null;
> >       }
> >
> >       private void download(byte[] byteArray, HttpServletResponse
> httpServletResponse)
> >               throws IOException, SQLException {
> >           try {
> >                BufferedOutputStream aBufferedOutputStream =new
>  BufferedOutputStream(httpServletResponse.getOutputStream());
> >               aBufferedOutputStream.write(byteArray,0,byteArray.length);
> >               aBufferedOutputStream.close();
> >           } catch (Exception e) {
> >               throw new IllegalArgumentException(e.getMessage());
> >           }
> >       }
> >
> >   My problem is  with all ".doc "files and some  ".pdf" files  .When
>  user clicks on the link , the browser opens a dialog box  with the option
> to save or open the file   .Suppose he has  choosen a ".doc"  file  to open
> , the browser opens micorsoft  word with an error message
> >
> >   Word experienced an error tying open the file.
> >   Try these suggestions.
> >   * Chaeck the file permissions for the document or drive.
> >   * Make sure there is sufficient free memory and disk space
> >   * Open the file with the text Recovery converter.
> >
> >
> >   I also had other files  like .xls and lot of .pdf and there is no
> problem with these files  but with all .doc files.
> >   Can Somebody guide with this issue.
> >   Thanks & Regards
> >
> >
> >
> >
> >
> > ---------------------------------
> > Yahoo! Photos
> >  Ring in the New Year with Photo Calendars. Add photos, events,
> holidays, whatever.
> >
>
>
> --
> "You can lead a horse to water but you cannot make it float on its back."
> ~Dakota Jack~
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

Reply via email to