Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## php.java.servlet
Class PhpCGIServlet

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              php.java.servlet.CGIServlet
                  php.java.servlet.FastCGIServlet
                      php.java.servlet.PhpJavaServlet
                          php.java.servlet.PhpCGIServlet

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class PhpCGIServlet

extends PhpJavaServlet

Handles requests from internet clients.

This servlet can handle GET/POST requests directly. These requests invoke the php-cgi machinery from the CGI or FastCGI servlet. Although the servlet to php-cgi back to servlet path is quite slow and consumes two servlet instances instead of only one (compared to the http frontend/j2ee backend setup), it could also be useful as a replacement for a system php installation, see the README in the `WEB-INF/cgi` folder. It is currently used for our J2EE test/demo.

See Also:
  `JavaBridge`, Serialized Form

Field Summary
`static int` | `CGI_CHANNEL` The CGI default port
`static int` | `CGI_MAX_REQUESTS` The max.

Fields inherited from class php.java.servlet.FastCGIServlet
`FCGI_CHANNEL`

Constructor Summary
`PhpCGIServlet()`

Method Summary
`void` | `destroy()` Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
`void` | `init(javax.servlet.ServletConfig config)` Sets instance variables.

Methods inherited from class php.java.servlet.CGIServlet
`getLocalName, getLocalPort`

Methods inherited from class javax.servlet.http.HttpServlet
`service`

Methods inherited from class javax.servlet.GenericServlet
`getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CGI_CHANNEL

    public static final int CGI_CHANNEL

  The CGI default port

  See Also:
    Constant Field Values

### CGI_MAX_REQUESTS

    public static final int CGI_MAX_REQUESTS

  The max. number of concurrent CGI requests.

  The value should be less than 1/2 of the servlet engine's thread pool size as this servlet also consumes an instance of PhpJavaServlet.

  See Also:
    Constant Field Values

Constructor Detail

### PhpCGIServlet

    public PhpCGIServlet()

Method Detail

### init

    public void init(javax.servlet.ServletConfig config)
              throws javax.servlet.ServletException

  Description copied from class: `CGIServlet`
  Sets instance variables.

  Modified from Craig R. McClanahan's InvokerServlet

  Specified by:
    `init` in interface `javax.servlet.Servlet`
  Overrides:
    `init` in class `PhpJavaServlet`
  Parameters:
    `config` - a `ServletConfig` object containing the servlet's configuration and initialization parameters
  Throws:
    `javax.servlet.ServletException` - if an exception has occurred that interferes with the servlet's normal operation
  See Also:
    `UnavailableException`

### destroy

    public void destroy()

  Description copied from class: `javax.servlet.GenericServlet`
  Called by the servlet container to indicate to a servlet that the servlet is being taken out of service. See `Servlet.destroy()`.

  Specified by:
    `destroy` in interface `javax.servlet.Servlet`
  Overrides:
    `destroy` in class `PhpJavaServlet`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD