| |
PDF
|
ICEfaces Online Reference |
Configuring the Web Application
At the heart of it, the TimeZone application is a standard J2EE 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 </description> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>javax.faces.application.CONFIG_FILES</param-name> <param-value>/WEB-INF/faces-config.xml</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> </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-2006. ICEsoft Technologies, Inc. http://www.icesoft.com |