|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
php.java.servlet.CGIServlet
php.java.servlet.FastCGIServlet
php.java.servlet.PhpCGIServlet
public class PhpCGIServlet
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 (compared with the http front end/j2ee back end
setup) and consumes two servlet instances
instead of only one, it can 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.
JavaBridge,
Serialized Form| Field Summary | |
|---|---|
static int |
CGI_CHANNEL
A local port which will be used by the SocketContextServer for high-speed local communication. The SocketContextServer may use ports [9567,...[9667 (bound to the local interface), if named pipes are not available (Windows only). |
static int |
CGI_MAX_REQUESTS
The max. |
static int |
CGI_SSL_CHANNEL
A local port which will be used instead of the current SSL port. |
| Fields inherited from class php.java.servlet.FastCGIServlet |
|---|
FCGI_CHANNEL |
| Constructor Summary | |
|---|---|
PhpCGIServlet()
|
|
| 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 php.java.servlet.CGIServlet |
|---|
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 |
|---|
public static final int CGI_CHANNEL
php.java.bridge.no_socket_server=true to switch it
off (not recommended).
SocketContextServer,
PipeContextServer,
Constant Field Valuespublic static final int CGI_SSL_CHANNEL
+):
<Service name="Catalina">
[...]
+ <Connector port="9157" address="127.0.0.1" />
[...]
</Service>
override_hosts in the WEB-INF/web.xml and add the following lines to your php.ini file:
java.hosts=127.0.0.1:<CUSTOM_NON_SSL_PORT>
java.servlet=On
public static final int CGI_MAX_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.
| Constructor Detail |
|---|
public PhpCGIServlet()
| Method Detail |
|---|
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
FastCGIServlet
init in interface javax.servlet.Servletinit in class FastCGIServletconfig - a ServletConfig object
containing the servlet's
configuration and initialization
parameters
javax.servlet.ServletException - if an exception has occurred that
interferes with the servlet's normal
operationConnectionPool,
FastCGIServlet.destroy()public void destroy()
FastCGIServlet
destroy in interface javax.servlet.Servletdestroy in class FastCGIServlet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||