定義副檔名與 MIME Type 對應,瀏覽器據此選擇外掛程式開啟檔案。缺少 MIME 標識可能導致系統崩潰。
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
目錄請求時依順序尋找首頁檔案。
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
HTTP 錯誤代碼或例外類型對應顯示頁面。
<error-page>
<error-code>404</error-code>
<location>/error404.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/except.jsp</location>
</error-page>
三大元素構成 Web 應用的基礎導航與錯誤處理機制。