Monday, June 02, 2008

Java Web Deployment Description
Web.xml is the file that is standard web deployment description for any j2ee web application server. The web.xml file define multiple component that the application can customize such as filtering, listeners, servlets, init-paramenters and local tag lib.

Filter: Filter are designed to warp calls to the web application, so here can intercept and perform variety global operation like security.
Listener: Listen either after or before an event. For JSF application faces-config.xml listen here
Servlet: This is the root of the web application.
Servlet Mapping: Give the reference to the servlet with a name.
Initial Parameter: These parameter are picked up by the servlet for configuration.
Tag Lib: This are used when tag lib stored in the locally and use in the JSP page.

Sample of Web.xml


Listener - org.apache.myfaces.webapp.StartupServletContextListener
context-param -javax.faces.STATE_SAVING_METHOD
Faces Servlet:-javax.faces.webapp.FacesServlet
Faces Servlet Mapping:- *.faces

No comments: