Adding the ICE Components to Your Application
To configure your application to use the ICE Components, complete the following steps:
- Setup the ICEfaces core framework if you have not already done so by following the steps in Getting Started, which pertain to using ICEfaces with any application.
- Add the ICE Components icefaces-compat.jar to your application classpath.
[icefaces.dir]/icefaces/lib/icefaces-compat.jar
- Add the required dependent libraries to your application class path:
Libraries |
servlet-profile : Tomcat |
web-profile : JBoss 6, Glassfish 3 |
commons-beanutils.jar |
Y |
Y |
commons-logging.jar |
Y |
Y |
javax.faces.jar |
Y |
|
jxl.jar |
Y |
Y |
krysalis-jCharts-1.0.0-alpha-1.jar |
Y |
Y |
- Add the required entries to the web.xml file:
<?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">
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.gmapKey</param-name>
<param-value>ABQIAAAADlu0ZiSTam64EKaCQr9eTRTOTuQNzJNXRlYRLknj4cQ89tFfpxTEqxQnVWL4k55OPICgF5_SOZE06A
</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/icefaces/*</url-pattern>
</servlet-mapping>
</web-app>
- Add the ICE Components XML namespace to any pages you want to use components on:
<html ... xmlns:ice="http://www.icesoft.com/icefaces/component">
You are now ready to begin adding ice: component tags to your page.