|
Create the Descriptor (web.xml)
And of course all good web applications need a web.xml. There is nothing specific related to Ajax Push that is required in the web.xml file.
Create a file called web.xml by typing or copying the following into your editor:
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name>ICEfaces SessionRenderer Tutorial: Easy Ajax Push</display-name> <description> A simple shared counter application that shows how to use the SessionRenderer API to add a collaborative element to your ICEfaces applications. </description> <context-param> <param-name>com.icesoft.faces.concurrentDOMViews</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>Persistent Faces Servlet</servlet-name> <servlet-class> com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>Blocking Servlet</servlet-name> <servlet-class> com.icesoft.faces.webapp.xmlhttp.BlockingServlet </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> <servlet-mapping> <servlet-name>Persistent Faces Servlet</servlet-name> <url-pattern>/xmlhttp/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Persistent Faces Servlet</servlet-name> <url-pattern>*.iface</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Persistent Faces Servlet</servlet-name> <url-pattern>*.jspx</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Blocking Servlet</servlet-name> <url-pattern>/block/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>counter.iface</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
Copyright 2005-2009. ICEsoft Technologies, Inc. |