php.java.servlet
Class PhpJavaServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
php.java.servlet.PhpJavaServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class PhpJavaServlet
- extends javax.servlet.http.HttpServlet
Handles requests from PHP clients.
When Apache, IIS or php
(cli) or php-cgi is used as a front-end, this servlet handles PUT
requests and then re-directs to a private (socket- or pipe-)
communication channel. This is the fastest mechanism to connect
php and java. It is even 1.5 times faster than local ("unix
domain") sockets used by the php.java.bridge.JavaBridge standalone
listener.
To enable fcg/servlet debug code start the servlet engine with -Dphp.java.bridge.default_log_level=6.
For example: java -Dphp.java.bridge.default_log_level=6 -jar /opt/jakarta-tomcat-5.5.9/bin/bootstrap.jar
There cannot be more than one PhpJavaServlet instance per web application. If you extend from this class, make sure to change
the .phpjavabridge => PhpJavaServlet mapping in the WEB-INF/web.xml.
- See Also:
- Serialized Form
Method Summary |
void |
destroy()
|
static java.lang.String |
getHeader(java.lang.String key,
javax.servlet.http.HttpServletRequest req)
Only for internal use |
void |
init(javax.servlet.ServletConfig config)
|
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 |
PhpJavaServlet
public PhpJavaServlet()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
destroy
public void destroy()
-
- Specified by:
destroy
in interface javax.servlet.Servlet
- Overrides:
destroy
in class javax.servlet.GenericServlet
getHeader
public static java.lang.String getHeader(java.lang.String key,
javax.servlet.http.HttpServletRequest req)
- Only for internal use