web.xml
This is how a typical web.xml file will look like for a standard J2EE application which has been designed and constructed on a struts framework
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>ABC Application</display-name>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/struts-config.xml,
/WEB-INF/struts-config_module1.xml
/WEB-INF/struts-config_module2.xml
</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>LoadApplicationServlet</servlet-name>
<servlet-class> com.abc.xyz.projectName.servlets. LoadApplicationDataServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>ApplicationLoggerServlet</servlet-name>
<servlet-class> com.abc.xyz.projectName.servlets. ApplicationLoggerServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<filter>
<filter-name>security</filter-name>
<filter-class> com.abc.xyz.projectName.security.SecurityFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>security</filter-name>
<url-pattern>/app/*</url-pattern>
</filter-mapping>
<!-- ======================================================== -->
<!-- The Welcome File List. -->
<!-- ======================================================== -->
<welcome-file-list>
<welcome-file>home.do</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri>/WEB-INF/tld/struts/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/struts/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/tld/struts/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/struts/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/tld/struts/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/struts/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/tld/struts/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/struts/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/tld/struts/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/struts/struts-template.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/tld/struts/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/tld/struts/taglib.tld</taglib-uri>
<taglib-location>/WEB-INF/taglib.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>