![]() |
Registering ICEfaces Servlets
As an extension to JSF, ICEfaces provides its own version of the FacesServlet (PersistentFacesServlet) as well as an additional Servlet (BlockingServlet) for handling asynchronous updates. We register these Servlets in the deployment descriptor file (web.xml) by adding the following entries:
<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>We also need to add a new Servlet mapping of PersistentFacesServlet to .iface.
<servlet-mapping> <servlet-name>Persistent Faces Servlet</servlet-name> <url-pattern>*.iface</url-pattern> </servlet-mapping>We also need to add a couple of mappings for ICEfaces' internal use.
<servlet-mapping> <servlet-name>Persistent Faces Servlet</servlet-name> <url-pattern>/xmlhttp/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Blocking Servlet</servlet-name> <url-pattern>/block/*</url-pattern> </servlet-mapping>To support ICEfaces running under MyFaces, we need to add an additional context parameter to tell MyFaces to use .iface as the default suffix so that requests are properly directed to ICEfaces' PersistentFacesServlet.
<context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.iface</param-value> </context-param>
|
Copyright 2005-2006. ICEsoft Technologies, Inc. http://www.icesoft.com |