Hi, Tomcat Developers:
Excuse me if this bug has been already reported. I also reported this bug
into Bugrat system. ID629.
Bug:
Tomcat3.2 doesn't support user defined MIME type in added
"TOMCAT_HOME\conf\web.xml". Instead, it returns text/plain.
Environment:
Windows NT, Service Pack 5. Pantium III. 2 Processors. 256MB RAM.
Reproduce:
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
type.
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 org.apache.tomcat.util.MimeMap.java 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.
Regards
Jason Zhu
Java Programmer
time:frame
Beacon IT Group
Phone: 0061-2-9413 3522
Email: [EMAIL PROTECTED]