Faraz - Captain
Faraz - Captain

Reputation: 1

Create a RichFaces JSF application on tomcat without using jboss app server

I know that RichFaces is maintained by JBOSS; what I'm trying to do is to add JSF/RicFaces to an existing maven based dynamic web project.

I would like to know if it is possible to use RichFaces without using JBOSS server? I'm using tomcat 6

What dependencies should I mention in my pom.xml?

Currently I've following in my POM, but I don't think that they are sufficient.

<dependency>
  <groupId>org.richfaces.framework</groupId>
  <artifactId>richfaces-impl</artifactId>
  <version>3.2.2.GA</version>
</dependency>

<dependency>           
    <groupId>org.richfaces.ui</groupId>
    <artifactId>richfaces-ui</artifactId>
    <version>3.2.2.GA</version>
</dependency>

Any help will be great!

Upvotes: 0

Views: 1574

Answers (2)

Dkyc
Dkyc

Reputation: 89

You don't need any specific application server for RichFaces. Any container that can run a Servlet is fine, such as Tomcat. Add the following dependencies in your pom.xml file in addition to your regular JSF 2.x dependency and you will be set. Rest of the dependencies are pulled automatically.

<dependency>
    <groupId>org.richfaces.ui</groupId>
    <artifactId>richfaces-components-ui</artifactId>
</dependency>
<dependency>
    <groupId>org.richfaces.core</groupId>
    <artifactId>richfaces-core-impl</artifactId>
</dependency>

Also note that you want to use a version of RichFaces greater than 4.x, 4.3.3.Final being the latest, as that is the version that has full support for JSF 2.0 and 2.1. For full JSF 2.2 support wait for RichFaces 5.0.x, which is in alpha at the moment.

Upvotes: 1

Patrik
Patrik

Reputation: 116

Here is an example of a working setup with the dependencies that may be of interest. It's from a project running in production on Tomcat 6.

    <dependency>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-ui</artifactId>
        <version>3.3.3.Final</version>
    </dependency>
    <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-api</artifactId>
        <version>3.3.3.Final</version>
    </dependency>
    <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-impl</artifactId>
        <version>3.3.3.Final</version>
    </dependency>
    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>1.2_12</version>
    </dependency>
    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>1.2_12</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>com.sun.facelets</groupId>
        <artifactId>jsf-facelets</artifactId>
        <version>1.1.11</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>com.sun.el</groupId>
        <artifactId>el-ri</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>

Upvotes: 0

Related Questions