TOC PREV NEXT INDEX

Configuring the Web Application


At the heart of it, the TimeZone application is a standard JEE web application that requires a deployment descriptor. This means we need to create a web.xml file.

The code for the web.xml file is as follows:

<?xml version="1.0" encoding="UTF-8"?>
 

 
<!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>ICEfaces Tutorial: Timezone Part 1</display-name>
 
  
 
  <description>
 
			ICEfaces Tutorial: Timezone Part 1
 
			Create TimeZone as a stock JavaServer Faces application.
 
  </description>
 

 
	<session-config>
 
    <session-timeout>30</session-timeout>
 
  </session-config>
 

 
  <context-param>
 
			<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
 
			<param-value>server</param-value>
 
  </context-param>
 

 
  <!-- Faces Servlet -->
 
  <servlet>
 
			<servlet-name>Faces Servlet</servlet-name>
 
			<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
 
			<load-on-startup> 1 </load-on-startup>
 
  </servlet>
 

 
  <!-- Faces Servlet Mapping -->
 
  <servlet-mapping>
 
			<servlet-name>Faces Servlet</servlet-name>
 
			<url-pattern>*.faces</url-pattern>
 
  </servlet-mapping>
 
  <welcome-file-list>
 
			<welcome-file>index.jsp</welcome-file>
 
  </welcome-file-list>
 
</web-app>
 

This is a fairly typical descriptor for a JSF application. The Faces Servlet is declared and configured to load on startup. The .faces extension is mapped to the Faces Servlet.

In TimeZone 1, the deployment descriptor file for running under MyFaces, web_myfaces.xml, is exactly the same as web.xml. It has been included for consistency with the later TimeZone steps, where the deployment descriptor files differ.



Copyright 2005-2009. ICEsoft Technologies, Inc.
TOC PREV NEXT INDEX