Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

mime type mapping for NRL

Posted on 2004-11-29
3
Medium Priority
?
1,231 Views
Last Modified: 2012-08-14
Hi!

I have NRL files which I uploaded into a directory. NRL file is just a small text file which will be involked by iManage program. The path to an NRL file from my page is as such:

http://tomcatserver:8080/demo/resource/Handout_MEL4_577594_2.nrl

When I click on this link, it display the content in the browser.

I have added the following in web.xml file but does not help.

      <mime-mapping id="MimeMapping_42">
         <extension>doc</extension>
         <mime-type>application/msword</mime-type>
      </mime-mapping>
      <mime-mapping id="MimeMapping_41">
         <extension>nrl</extension>
         <mime-type>application/nrl</mime-type>
      </mime-mapping>  

How do I in JSP code such that it will open this file with the right program?

Thank you.
0
Comment
Question by:Tuan_Jean
1 Comment
 
LVL 29

Accepted Solution

by:
bloodredsun earned 200 total points
ID: 12900340
You need to set the contentType also known as the MIME type:

response.setContentType( application/msword ); // MIME type for word doc
or

response.setContentType( application/nrl ); // MIME type for word nrl

This will only work if the browser has the mimetype set correctly ,i.e. is this case MS Word and NRL installe don their computer. You can easily tell if the mime-type is set as else it will ask you "which program do you want to open this with?"
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dropbox has a relatively new feature called Smart Sync.  This feature allows Dropbox Professional (not plus) and Dropbox Business (if enabled) users to store information in Dropbox WITHOUT storing any files on their computer.
Welcome to 2018! Exciting things lie ahead in the world of tech. To start things off, we compiled great member articles on how to stay safe, ways to learn, and much more! Read on to start your new year right.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question