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