Web.xml parameter sequence

xiaoxiao2021-04-09  346

This article is transferred from http://annaliu21.bokee.com/3689008.html

WEB.XML file format - must pay attention to order

Since various people in Web program have different divisions, the deployment description file of the web program is a communication mechanism between program components providers, program assembers, and program deployers; Servlet 2.4 has specified in the web server. Web.xml in the DTD format, and servlet 2.4 will define web.xml in accordance with the XML Schema format; in fact these two format web.xml only distinguish between the head, and its content is deployed by the Web program. The deployment element that appears in web.xml mainly contains the following information:

SERVLETCONTEXT's initialization variable; interactive session (session) setting; servlet declaration; mapping, mapping; Application LifeCyle Listener; Filter Declaration; Filter Map of URL or servlet / JSP; MIME type; welcome file (Welcome file); security setting information; taglib configuration; JNDI object (Env-entry, EJB-REF, EJB-LOCAL- REF, Resource-Ref, Resource-Env-Ref).

The specific identifier in web.xml is:

Icon?, Display-name?, description?, distributable?, context-param *, filter *, filter-maping *, listener *, servlet *, servlet-maping *, session-config?, mime-maping *, Welcome- FILE-LIST?, Error-Page *, Taglib *, Resource-Env-Ref *, Resource-Ref *, Security-ConsTRAINT *, LOGIN-Config?, sec ............

The two items of Taglib configuration and JNDI objects are supported by the web server that supports J2EE. For servlet / JSP servers that do not support J2EE, these two items do not need; elements in web.xml need to appear in the order and order in the specified case.

转载请注明原文地址:https://www.9cbs.com/read-133011.html

New Post(0)