I've never done filters before. I know how to do the filter-mapping from web.xml and know Java programming but not how to make filters for Tomcat. Could you point me in the right direction?
-----Original Message----- From: Trond G. Ziarkowski [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 19, 2005 2:36 PM To: Tomcat Users List Subject: Re: Plain text mime-mapping and IE Hi Tim, try serving the file through a servlet or jsp, or use a filter mapped to *.las and *.dat, and use response.setHeader("Content-Disposition", "inline; filename=file.txt"), and response.setContentType("text/plain"). Works for me... Trond Tim Sodergren wrote: >Hello Group, > >First time user. > >I am using Tomcat 4.1.30 to serve (among other things) plain text files >with .dat and .las extensions. I have added the following lines to the >conf/web.xml file: > > <mime-mapping> > <extension>las</extension> > <mime-type>text/plain</mime-type> > </mime-mapping> > <mime-mapping> > <extension>dat</extension> > <mime-type>text/plain</mime-type> > </mime-mapping> > >And they display properly in Netscape or Firefox. When trying to view >in IE, however it doesn't recognize the file type and prompts the user >to open or save. If the user selects open whatever text editor IE >chooses can't find the file. Save works properly. Does IE's >mime-sniffer completely ignore my server settings? Is there a >workaround for this (without having to change all of my files and links to .txt)? > >Thanks in advance. > >-Tim > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.17 - Release Date: 4/19/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.17 - Release Date: 4/19/2005 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]