tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Zhu <>
Subject Tomcat3.2 final doesn't support user defined MIME type
Date Wed, 20 Dec 2000 07:07:05 GMT
Hi, Tomcat Developers:

Excuse me if this bug has been already reported.  I also reported this bug
into Bugrat system.  ID629.

Tomcat3.2 doesn't support user defined MIME type in added
"TOMCAT_HOME\conf\web.xml".  Instead, it returns text/plain.

Windows NT, Service Pack 5.  Pantium III.  2 Processors.  256MB RAM.

Deploy an application on Tomcat3.2 for client downloading throught Java Web
Start 1.0.
It is working perfect on Tomcat3.1Beta.  Haven't tested on Tomcat3.1.

Work Around:
By looking into source code provided, org.apache.tomcat.util.MimeMap class
provides a default map and a user defined map.  There is also a method:
addContentType() which is used to add a user defined type into the user
defined map.  But by searching the whole source, there is only one class:
org.apache.tomcat.core.Context calls this inside its own addContentType()
method.  So actually this is never been called to add a user defined mime
Another prove is: after I delete "TOMCAT_HOME\conf\web.xml" file, the
tomecat still starts up without complaining or error.  It seems to me that
tomcat doesn't read "TOMCAT_HOME\conf\web.xml" file.  Nor such messages
printed on the dos prompt window.
Work around:  In I added one more line
in Static initializer: defaultMap.put("jnlp",
"application/x-java-jnlp-file"); and I recompiled this class, overwrote the
one in TOMCAT_HOME\lib\webserver.jar.  Finally it returns the correct mime
type for jnlp.

Thanks for your time.


Jason Zhu
Java Programmer
Beacon IT Group
Phone: 0061-2-9413 3522

View raw message