Fork me on GitHub

Description

jFastCGI allows a servlet/portlet container to act as a FastCGI gateway that serves content generated by a FastCGI producer. It gives an original and reliable way for using servlet containers such as tomcat or jetty for serving PHP pages, or any other FastCGI application.

Installing the library in your webapp

Installing manually

If you're not using Maven or another dependency manager, see the Download page for details on how to manually get all the dependencies required.

Installing with Maven / SBT / Gradle / Ivy

        <!-- add this dependency to use inside a servlet container (tomcat, jetty, etc.) -->
        <dependency>
            <groupId>org.jfastcgi.client</groupId>
            <artifactId>client-servlet</artifactId>
            <version>2.4-SNAPSHOT</version>
        </dependency>

        <!-- add this dependency to use inside a servlet container with the Spring Framework -->
        <dependency>
            <groupId>org.jfastcgi.client</groupId>
            <artifactId>client-spring</artifactId>
            <version>2.4-SNAPSHOT</version>
        </dependency>


        <!-- add this dependency to use inside a portlet container (liferay, etc.) -->
        <dependency>
            <groupId>org.jfastcgi.client</groupId>
            <artifactId>client-portlet</artifactId>
            <version>2.4-SNAPSHOT</version>
        </dependency>

Portlet support

Our *Client-Portlet* Project offers support to use FastCGI Applications as Portlets.

Spring integration

We've got a Integration Project allowing you to configure jFastCGI with the Spring Framework. The integration requires at least Spring in the version of 2.5.6 or higher.

Getting started - Running the simple way : the FastCGIServlet

In most cases, if you don't want to use pooling/distributing between several fastCGI servers, you just have to declare the fastCGI Servlet and declare the address of the external fastCGI program.

<servlet>
    <servlet-name>FastCGI</servlet-name>
    <servlet-class>org.jfastcgi.servlet.FastCGIServlet</servlet-class>
    <init-param>
        <param-name>server-address</param-name>
        <param-value>localhost:6666</param-value>
    </init-param>
</servlet>

For more detailed configurations / examples, see the Client-Servlet and the Servlet/Portlet configuration