Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MIME Types  RSS feed

 
Sonalee Mohapatra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some links on a html page (application hosted on weblogic) which point to word documents/excel sheets. When i click on the links, they should open up the file download dialog of windows (save to disk/open from current location). Instead, it shows up junk in a new window.
I tried setting the mime types in the web.xml file as follows
for doc files :
<mime-mapping>
<extension>
doc
</extension>
<mime-type>
application/msword
</mime-type>
</mime-mapping>
still doesnt work though. Please advise on what is wrong.
Regards
 
Karthik Prabu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sonalee
Try setting the "Content-Disposition" header in the Response.
karthik
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!