Configuring your web.xml file

A web.xml file defines settings that are used in a Java web application. The web.xml file must be placed in the WEB-INF directory of your web application. The root element in the file must always be <web-app>. The following settings can be added to your web.xml file.
Example: Web.xml file using JSF
You must change the following parameters:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC
        "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
        <display-name>web_application_name</display-name>
        <listener>
                <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
        </listener>
        <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup> 1 </load-on-startup>
        </servlet>
        <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.faces</url-pattern>
        </servlet-mapping> 
        <context-param>
                <param-name>javax.faces.application.CONFIG_FILES</param-name>
                <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>
        <context-param>
                <param-name>crystal_image_uri</param-name>
                <param-value>/web_application_name/crystalreportviewers</param-value>
        </context-param>   
        <context-param>
                	<param-name>crystal_servlet_uri</param-name>
                	<param-value>/crystalreportviewerservlet</param-value>
        </context-param>  
        <servlet>
      	        	<servlet-name>CrystalReportViewerServlet</servlet-name>
                	<servlet-class>com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet</servlet-class>
        </servlet>
        <servlet-mapping>
               	 <servlet-name>CrystalReportViewerServlet</servlet-name>
                	<url-pattern>/CrystalReportViewerHandler</url-pattern>
        </servlet-mapping>
</web-app>