web.xml (Deployment Descriptor)
Learn web.xml (Deployment Descriptor) (Servlet Configuration, JSP Servlets) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
What is web.xml? • web.xml is called the Deployment Descriptor of a Java Web Application. • It is an XML configuration file that defines how the web application should behave inside the servlet container. • It is located inside the WEB-INF folder and cannot be accessed directly from the browser. Why is it Important? • Central configuration file for web applications • Controls request routing • Defines lifecycle behavior • Manages session settings Main Responsibilities • Configure Servlets • Map URLs to Servlets • Configure Filters & Listeners • Define Welcome Files • Session Configuration •...