Fork me on GitHub


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.) -->

        <!-- add this dependency to use inside a servlet container with the Spring Framework -->

        <!-- add this dependency to use inside a portlet container (liferay, etc.) -->

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.


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