Memorizing the <mime-mapping> DD tag
You can configure a mapping between an extension and a mime type in the DD. This will probably be the easiest tag to remember, because it just makes sense—you map between an extension and a mime-type, and guess what? In a rare moment of simplicity and clarity, they named the tag sub-elements “extension” and “mime-type”. That means you have to remember only one thing—that the tag elements are named for exactly what they are!
Unless you start thinking of it as “file-type” and “content-type”. But no, you won’t do that. You’ll memorize it just like this.
Declaring a <mime-mapping>

Note
Don’t include the “.” in the extension!
It’s just the characters that make up the extension, not the “.” that separates the file name from the extension.
Note
It’s not <file-type> and <content-type>!
Burn it in—<extension> and <mime-type>.
<extension> and <mime-type>
<extension> and <mime-type>
<extension> and <mime-type>
<extension> and <mime-type>
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access