Donnerstag Mrz 11, 2010

ICEFaces Dependencies (JAR's) mit Maven konfigurieren

Wer der JSF-Framework ICEfaces verwendet wird am Anfang möglicherweise darüber stolpern, dass man zunächst nicht weiß, welche JAR's man überhaupt benötigt. ICEfaces hat hier eine Übersicht ins Netz gestellt. Für das Timezone-Tutorial habe ich mir für Tomcat 6 folgende POM (Maven) erstellt:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.neurox.tutorials</groupId>
<artifactId>timezone2</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>timezone2 Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>sun-jaxws</groupId>
<artifactId>FastInfoset</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.icefaces</groupId>
<artifactId>icefaces-comps</artifactId>
<version>1.8.2</version>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.icefaces</groupId>
<artifactId>icefaces-facelets</artifactId>
<version>1.8.2</version>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>1.2.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.2.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.5</version>
</dependency>

<!--
Only required when using Excel format export with ice:dataExporter
Component
-->
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6</version>
</dependency>

<!-- Only required when using the ice:outputChart component -->
<dependency>
<groupId>net.sf.jcharts</groupId>
<artifactId>krysalis-jCharts</artifactId>
<version>1.0.0-alpha-1</version>
</dependency>
</dependencies>
<build>
<finalName>timezone1</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

Leider habe ich auch eine Weile gebraucht um die passende web.xml zusammen zu stellen. Hier eine funktionierede Version in Kombination mit myfaces:

<?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 2</display-name>

<description>
ICEfaces Tutorial: Timezone Part 2
Show how simple it is to
integrate ICEfaces technology into an existing
JavaServer Faces
environment.
</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.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>

<!--
Specifies to the ICEfaces framework that synchronous update mode is to
be used. By default, ICEfaces uses asynchronous update mode to support
server-initiated updates (AJAX push). Setting to true will enable
synchronous update mode and disable AJAX push features.
-->
<context-param>
<param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>true</param-value>
</context-param>

<!--
ConfigureListener is not generally required. Due to an apparent bug in
Tomcat users have reported seeing the following error "SEVERE:
ICEfaces could not initialize JavaServer Faces. Please check that the
JSF .jar files are installed correctly.". Specifying the
ConfigureListener resolves the issue.
-->
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<!--
<servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
-->
<load-on-startup>1</load-on-startup>
</servlet>

<!-- Persistent Faces 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>

<!-- Blocking 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>

<!-- Persistent Faces Servlet Mappings -->
<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>

<!-- Blocking Servlet Mapping -->
<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>

<session-config>
<session-timeout>30</session-timeout>
</session-config>

<!-- Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

Ich hoffe, das macht den Einstieg ein wenig leichter.

Kommentare:

[Trackback] Bench.

Gesendet von Bench. am März 19, 2011 at 05:36 AM MEZ #

[Trackback] Desk calendars. Lap desk.

Gesendet von Corner computer desk. am März 22, 2011 at 11:21 PM MEZ #

[Trackback] Help desk management software.

Gesendet von Physicians desk reference. am März 24, 2011 at 02:51 AM MEZ #

[Trackback] Physician s desk reference. Easel and art desk. Executive desk. Oak office desk. Lap desk. Mobile office desk. Girls desk. Desk accessories. Roll top desk antique.

Gesendet von L shaped desk. am März 25, 2011 at 12:46 AM MEZ #

[Trackback] Vote sofa.

Gesendet von Vote sofa. am März 27, 2011 at 06:01 AM MESZ #

[Trackback] Jr furniture. Jr furniture canada. Jr butler furniture. Jr furniture richmond.

Gesendet von Jr furniture. am März 27, 2011 at 09:10 PM MESZ #

[Trackback] Theresa rossignol.

Gesendet von Theresa rossignol. am April 01, 2011 at 10:18 AM MESZ #

[Trackback] History of digital photography. Digital concepts. Best digital camera.

Gesendet von Digital photo frame. am April 03, 2011 at 11:42 PM MESZ #

[Trackback] Ikea home workspace furniture. Ikea workspace.

Gesendet von Ikea workspace. am April 04, 2011 at 06:20 PM MESZ #

[Trackback] Digital blasphemy. Digital picture frames. Camera digital panasonic. Digital camera.

Gesendet von Camera digital mini. am April 07, 2011 at 02:39 AM MESZ #

[Trackback] Digital picture frame.

Gesendet von Sony digital cameras. am April 08, 2011 at 01:39 AM MESZ #

[Trackback] Victorian chaise longue. Chaise longue. Chaise longue lafuma. Modern chaise longue. Chaise longue model detroit.

Gesendet von Chaise longue. am April 08, 2011 at 02:18 PM MESZ #

[Trackback] Footstool. Portable footstool.

Gesendet von Padded footstool. am April 09, 2011 at 02:41 AM MESZ #

[Trackback] Davis cabinet dresser 322. Crayola dresser. Men s dresser valet. Antique oak dresser. Hydraulic dresser motors.

Gesendet von Dresser valet. am April 09, 2011 at 03:39 PM MESZ #

Senden Sie einen Kommentar:
  • HTML Syntax: Eingeschaltet