Discussion:
web.xml mime-mappings
Baron Fujimoto
2018-11-01 02:01:05 UTC
Permalink
Apologies in advance if this is a dumb question.

I usually base our config files off of the sample config files as a starting point.

The sample web.xml contains many mime-mapping elements (1000+ I think). Is there any good reason to include these if your application isn't going to use the vast majority of these mime-types? I.e., is it recommended to edit it down to just those that the application is likely to use? It seems like it would be less unwieldy if I did this, but I just want to make sure there's no compelling downside to it.
--
Baron Fujimoto <***@hawaii.edu> :: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Luis Rodríguez Fernández
2018-11-01 08:07:10 UTC
Permalink
Hello Baron,

There are no dumb questions, no worries :)

Are you referring to the $CATALINA_BASE/conf/web.xml by chance? This is the
default web.xml [1] that defines default values for all the webapps
deployed in your tomcat server. Me personally I rarely modify it.

Me, as a sample web.xml I usually take either the one distributed in the
always good $CATALINA_BASE/webapps/examples/WEB-INF/web.xml or the one from
the classic "hello, world" app [2]

Hope it helps,

Luis

[1] https://tomcat.apache.org/tomcat-9.0-doc/default-servlet.html
[2] https://tomcat.apache.org/tomcat-9.0-doc/appdev/sample/
Post by Baron Fujimoto
Apologies in advance if this is a dumb question.
I usually base our config files off of the sample config files as a starting point.
The sample web.xml contains many mime-mapping elements (1000+ I think). Is
there any good reason to include these if your application isn't going to
use the vast majority of these mime-types? I.e., is it recommended to edit
it down to just those that the application is likely to use? It seems like
it would be less unwieldy if I did this, but I just want to make sure
there's no compelling downside to it.
--
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum
---------------------------------------------------------------------
--
"Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."

- Samuel Beckett
Loading...