Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm currently engaged with a web based application that needs to show text files via directory listing in the web server (Tomcat). The text file has an extension of .inp and .trg, it seems that IE8 is not wrapping the text properly and ignores the white spaces and line breaks of the file. When I create a sample plain text in my directory with the extension of .txt, IE8 interprets it properly. Can you give me a solution for IE8 to interpret word-wrapping with file extension ( .inp, .trg ) rather than .txt?

The previous application is deployed in Apache, and IE8 interprets the wrapping properly. Apparently when it is deployed in tomcat the wrapping is gone. By the way I'm using Jython.

Will it be on the server side (Tomcat)? or in the client side (web browser)?

Thanks!

share|improve this question
add comment

1 Answer 1

For Tomcat, add the MIME types in the conf/web.xml file, as given below

<mime-mapping>
<extension>inp</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>

for each extension

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.