Unfortunately, I don't think IE is that smart.  I've run into a similar
issue, and have simply added a parameter to the end of the URL ending with
the file name.

For example ...something/mydocument.jsp becomes
...something/mydocument.jsp?file=filename.doc

Even if you're doing nothing with the file parameter, this should get IE to
treat it properly.  You'll still have to set the mimetype.  An added benefit
of this is the default name in the File->Save As... dialog box *should* be
filename.doc (if I remember correctly).

Good luck,

Darren.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Fyffe Carl
> Sent: Tuesday, February 27, 2001 11:18 AM
> To: Orion-Interest
> Subject: RE: How do I map a .doc extension to a .jsp execution
>
>
> Guys,
>
> I could be wrong here, but you may want to try just setting the mime type
> that is sent to the browser.  I don't believe that the .doc extension is
> required to get IE to display the file as a word document.  Just send the
> mime type back as: application/msword and it will see the file as a word
> document.  This will also cause netscape to try to save the file
> instead of
> read it.  Hope this helps.
>
> Carl
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Schnitzer
> Sent: Tuesday, February 27, 2001 12:54 PM
> To: Orion-Interest
> Subject: RE: How do I map a .doc extension to a .jsp execution
>
>
> While that would work, you would have to create a separate jsp for each
> document... really you should probably create your own servlet, map it
> to *.doc in the same way, and use request.getPathInfo() and
> request.getPathTranslated() (or just forward to the request to a URL in
> a protected directory).
>
> Or better yet, look into filters.  I haven't looked at the Servlet 2.3
> specification for filters yet, but I suspect this is exactly the sort of
> problem filters are designed to solve.
>
> Jeff
>
> >-----Original Message-----
> >From: Christian Billen [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, February 27, 2001 5:03 AM
> >To: Orion-Interest
> >Subject: RE: How do I map a .doc extension to a .jsp execution
> >
> >
> >I haven't tried this but try to modify the
> >config/global-web-application.xml
> >and add a mapping for the jsp servlet:
> ><servlet-mapping>
> >                     <servlet-name>jsp</servlet-name>
> >                     <url-pattern>/*.doc</url-pattern>
> >             </servlet-mapping>
> >
> >
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED]]On Behalf Of Christian
> >> Kvalheim
> >> Sent: Monday, February 26, 2001 3:31 PM
> >> To: Orion-Interest
> >> Subject: How do I map a .doc extension to a .jsp execution
> >>
> >>
> >> Hello
> >>
> >> I have the following problem. We have a certain number
> >> of Word documents in out database that we want to
> >> output to the browser. Everything is fine, we get the
> >> document as a blob from the database and into the jsp
> >> variables. However for internet explorer to recognise
> >> the file as a word document (and start the viewer) we
> >> need to append a .doc extension. Since the urlcode is
> >> ...something/mydocument.jsp it does not get
> >> recognised. How can I make orion treat .doc files as
> >> .jsp files for execution on the server ?? This would
> >> allow me to wrap the execution logic into the .doc
> >> file and let the browser see the document (changing
> >> acording to which document is fetched from the server)
> >>
> >> Yours
> >>
> >> Christian Amor Kvalheim
> >> Quality Manager +
> >>
> >> __________________________________________________
> >> Do You Yahoo!?
> >> Get email at your own domain with Yahoo! Mail.
> >> http://personal.mail.yahoo.com/
> >>
> >>
> >>
> >
> >
> >
>
>
>
>


Reply via email to