• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Opening a MS Word Document from JSP using Relative URL

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have this requirement of opening some help documents in MS Word Format.

We have the document placed in the web layer ( along with JSPs) and then we try to access the documents using the relative URL.

The full path gets replaced correctly, but the Word Document is opened in browser in text format.

<A href="/xxxxxxxx/docs/module/document1.doc" >Open A Word Document</A>

I do not have any p roblem in opening any word document from internet and ms word is already in the file types for my computer.

Any thoughts on this ??

Browser - IE 6.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Vicky",
Please check your private messages
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i changed my display name, per your policy.

Can anybody offer any suggestions for my issue ?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What container are you using?
Does it have a mime type set up for the ".doc" extension?
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Weblogic Application Server.

I do not have any entries for any MIME type in web.xml.

But it works fine for a PDF File.
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I added the MIME Types to web.xml and it fixed the issue.

<mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>


Thanks for your help
[ October 04, 2007: Message edited by: Vicky Mohan ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know how Weblogic works but in Tomcat, there is a global web.xml file that contains all of the pre-set mime types.
I'm guessing there is a similar config file in WebLogic.

If you want to pursue it, let me know and I'll move this thread to our BEA Weblogic forum for you.

-Ben
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much. I would really appreciate it.

If we could get it set globally in weblogic, it will be more appropriate.

Please forward this to weblogic group.
 
reply
    Bookmark Topic Watch Topic
  • New Topic