com.caucho.quercus.servlet
Class QuercusServletImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.caucho.quercus.servlet.QuercusServletImpl
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig
Direct Known Subclasses:
GoogleQuercusServletImpl, ResinQuercusServlet

public class QuercusServletImpl
extends HttpServlet

Servlet to call PHP through javax.script.

See Also:
Serialized Form

Field Summary
protected  ServletConfig _config
           
protected  QuercusContext _quercus
           
protected  ServletContext _servletContext
           
 
Constructor Summary
QuercusServletImpl()
           
 
Method Summary
protected  void checkServletAPIVersion()
          Makes sure the servlet container supports Servlet API 2.4+.
 void destroy()
          Destroys the quercus instance.
protected  Path getPath(HttpServletRequest req)
           
protected  QuercusContext getQuercus()
          Returns the Quercus instance.
protected  void handleThrowable(HttpServletResponse response, java.lang.Throwable e)
           
 void init(ServletConfig config)
          initialize the script manager.
protected  void initImpl(ServletConfig config)
           
protected  WriteStream openWrite(HttpServletResponse response)
           
 void service(HttpServletRequest request, HttpServletResponse response)
          Service.
 void setProfileProbability(double probability)
          Sets the profiling mode
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_quercus

protected QuercusContext _quercus

_config

protected ServletConfig _config

_servletContext

protected ServletContext _servletContext
Constructor Detail

QuercusServletImpl

public QuercusServletImpl()
Method Detail

init

public final void init(ServletConfig config)
                throws ServletException
initialize the script manager.

Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Parameters:
config - the servlet's configuration
Throws:
ServletException

initImpl

protected void initImpl(ServletConfig config)
                 throws ServletException
Throws:
ServletException

setProfileProbability

public void setProfileProbability(double probability)
Sets the profiling mode


checkServletAPIVersion

protected void checkServletAPIVersion()
Makes sure the servlet container supports Servlet API 2.4+.


service

public final void service(HttpServletRequest request,
                          HttpServletResponse response)
                   throws ServletException,
                          java.io.IOException
Service.

Overrides:
service in class HttpServlet
Parameters:
request - request information
response - response object for returning data to the client.
Throws:
ServletException
java.io.IOException

handleThrowable

protected void handleThrowable(HttpServletResponse response,
                               java.lang.Throwable e)
                        throws java.io.IOException,
                               ServletException
Throws:
java.io.IOException
ServletException

openWrite

protected WriteStream openWrite(HttpServletResponse response)
                         throws java.io.IOException
Throws:
java.io.IOException

getPath

protected Path getPath(HttpServletRequest req)

getQuercus

protected QuercusContext getQuercus()
Returns the Quercus instance.


destroy

public void destroy()
Destroys the quercus instance.

Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet