php.java.servlet.fastcgi
Class FastCGIServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
php.java.servlet.fastcgi.FastCGIServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class FastCGIServlet
- extends javax.servlet.http.HttpServlet
A CGI Servlet which connects to a FastCGI server. If allowed by the
administrator and if a fast cgi binary is installed in the JavaBridge web application or
DEFAULT_CGI_LOCATIONS, the bridge can automatically start one FCGI
server on the computer. Default is Autostart.
The admin may start a FCGI
server for all users with the command:
cd /tmp
REDIRECT_STATUS=200 X_JAVABRIDGE_OVERRIDE_HOSTS="/" PHP_FCGI_CHILDREN="5"
PHP_FCGI_MAX_REQUESTS="5000" /usr/bin/php-cgi -b 127.0.0.1:9667
When the program /bin/sh
does not exist, a program called launcher.exe
is called instead:
launcher.exe -a "path_to_php-cgi.exe" -b 9667
.
- Author:
- jostb
- See Also:
Util.DEFAULT_CGI_LOCATIONS
,
Serialized Form
Method Summary |
void |
destroy()
Destroys the FastCGI connection pool, if it exists. |
void |
init(javax.servlet.ServletConfig config)
Create a new FastCGI servlet which connects to a PHP FastCGI server using a connection pool. |
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 |
FastCGIServlet
public FastCGIServlet()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Create a new FastCGI servlet which connects to a PHP FastCGI server using a connection pool.
If the JavaBridge context exists and the JavaBridge context can
start a FastCGI server and the current context is configured to
connect to a FastCGI server, the current context connects to
the JavaBridge context to start the server and then uses this
server for all subsequent requests until the server is
stopped. When FastCGI is not available (anymore), the parent
CGI servlet is used instead.
- Specified by:
init
in interface javax.servlet.Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Parameters:
config
- The servlet config
- Throws:
javax.servlet.ServletException
- See Also:
FCGIConnectionPool
,
destroy()
destroy
public void destroy()
- Destroys the FastCGI connection pool, if it exists.
- Specified by:
destroy
in interface javax.servlet.Servlet
- Overrides:
destroy
in class javax.servlet.GenericServlet