| |
PDF
|
ICEfaces Online Reference |
Configuration Reference
The icefaces.jar file contains a faces-config.xml file that configures the ICEfaces extensions. Specifically, the configuration file registers the Direct-to-DOM renderers. There is no need for the developer to modify the ICEfaces faces-config.xml.
The application's web.xml file must include necessary Servlet registration and mappings.
The ICEfaces Servlets are registered as follows:
<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>The Servlet mappings are established as follows:
<servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jspx</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>/xmlhttp/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Blocking Servlet</servlet-name> <url-pattern>/block/*</url-pattern> </servlet-mapping>The context listener is established as follows:
<listener> <listener-class> com.icesoft.faces.util.event.servlet.ContextEventRepeater </listener-class> </listener>Synchronous or asynchronous updates can be turned off/on application-wide using the ICEfaces context parameter, com.icesoft.faces.synchronousUpdate. Typically this is set in the web.xml file of your web application.
<context-param> <param-name>com.icesoft.faces.synchronousUpdate</param-name> <param-value>true/false</param-value> </context-param>If not specified, the parameter value is false; thus, by default, the application will run in asynchronous mode.
To allow multiple windows for a single application, concurrent DOM views must be enabled. This is set through the ICEfaces context parameter, com.icesoft.faces.concurrentDOMViews. Typically, this is set in the web.xml file of your web application:
<context-param> <param-name>com.icesoft.faces.concurrentDOMViews</param-name> <param-value>true</param-value> </context-param>To cause request scope to last only for the duration of a single user event, "standard request scope" must be enabled. This is set through the ICEfaces context parameter:
com.icesoft.faces.standardRequestScopeTypically this is set in the web.xml file of your web application:
<context-param> <param-name>com.icesoft.faces.standardRequestScope</param-name> <param-value>true</param-value> </context-param>Some browsers are configured to block JavaScript interpretation or some browsers cannot interpret JavaScript content. For these instances, ICEFaces can be configured to redirect the browser to a custom error page.
This feature can be turned on application-wide using the ICEfaces context parameter, com.icesoft.faces.javascriptBlockedRedirectURI.
<context-param> <param-name>com.icesoft.faces.javascriptBlockedRedirectURI</param-name> <param-value>...custom error page URL....</param-value> </context-param>If not specified, by default the server will send an HTTP error code '403 - Javascript not enabled'. This is to avoid any ambiguity, since the accessed page would be rendered but any interaction with it would be impossible.
Resources such as JavaScript and CSS files can be compressed when sent to the browser. This can improve application load time in certain deployments. This configuration works independently from the web-server configuration.
The feature can be turned on application-wide using the ICEfaces context parameter, com.icesoft.faces.compressResources.
<context-param> <param-name>com.icesoft.faces.compressResources</param-name> <param-value>true/false</param-value> </context-param>If not specified, by default the application will not compress the resources.
The maximum file upload size can be specified in the web.xml file of your web application as follows:
<context-param> <param-name>com.icesoft.faces.uploadMaxFileSize</param-name> <param-value>1048576</param-value> </context-param>If not specified the default value for file upload is 10485760 bytes (10 megabytes).
To specify the directory location where uploaded files are stored, the following parameter is used:
<context-param> <param-name>com.icesoft.faces.uploadDirectory</param-name> <param-value>images/upload</param-value> </context-param>This parameter works in conjunction with the ice:inputFile component attribute "uniqueFolder" with four possible combinations as illustrated in the table below:
/application-context/uploadDirectory/sessionid/ /application-context/sessionid/ /application-context/uploadDirectory/ /application-context/
|
Copyright 2005-2006. ICEsoft Technologies, Inc. http://www.icesoft.com |