| |||||||||||
| |||||||||||
Default file (MiMe types) for Apache httpd and Apache Tomcat
Apache Tomcat web server default MIME type
What file extension maps to what "Mime Type" in Apache Tomcat? It's important to know, since the Mime type is sent out by the server to the browser to tell the browser how to handle the following data stream. a) There is a long list of extensions and their mappings in the conf/web.xml file - for example it contains <mime-mapping>b) Within the source code of Servlets, an appropriate method call is used to set the type, for example outgoing.setContentType("text/html");c) If you have enabled CGI, you'll generate a Mime header in your script d) And if none of these apply ... the default Apache Tomcat Mime Type is text/plain. Here's an example using a .duck extension ... ![]() Apache httpd web server default MIME type a) Most extensions are mapped according to instructions in the TypesConfig directive in httpd.conf, which may read something like: TypesConfig conf/mime.typesb) Perl scripts (CGI) can generate a mime header, and if you're using PHP you can use the header section to change the type. c) If the mime_magic module is loaded, the contents of the file itdelf will be examined for clues as to the return type. The configuration directive is <IfModule mod_mime_magic.c>d) If the httpd server still hasn't been able to work out the type it will use the value specified in the DefaultType setting in httpd.conf: DefaultType text/plain(written 2008-03-04 16:55:32) Associated topics are indexed under A653 - Web Application Deployment - Tomcat - Configuring Web ApplicationsA603 - Web Application Deployment - Further httpd Configuration
Some other Articles
What colour is the season?Melksham - Swindon. Train v Bus v Car Strange behaviour of web directory requests without a trailing slash Languages compared - based on developer community size Default file (MiMe types) for Apache httpd and Apache Tomcat Guidlines for posting on a forum Java Compiler - needs all classes, compiles them all too Uploading to a MySQL database through PHP - examples and common questions HST Power Car TravelWatch SouthWest Calling on Melksham / Trowbridge / Devizes / Chippenham businesses 1690 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 at 50 posts per pageThis is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price. Link to Ezine home page (for reading). Link to Blogging home page (to add comments). |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||