com.caucho.jsp
Class QServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--com.caucho.jsp.QServlet
- All Implemented Interfaces:
- java.io.Serializable, Servlet, ServletConfig
- Direct Known Subclasses:
- JspServlet, XtpServlet
- public abstract class QServlet
- extends GenericServlet
Base servlet for both JSP and XTP. It's primarily responsible for
returning the proper error messages when things go wrong.
The manager create the compiled JSP and XTP pages. The manager
returns a Page object which is actually executed.
- See Also:
JspManager
,
XtpManager
,
Page
, Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
application
protected CauchoApplication application
QServlet
public QServlet()
init
public void init(ServletConfig config)
throws ServletException
- Initialize the servlet. If necessary, convert the ServletContext
to a CauchoApplication. Also, read the configuration Registry
it it hasn't been read yet.
- Overrides:
init
in class GenericServlet
- Following copied from class:
javax.servlet.GenericServlet
- Parameters:
config
- the servlet's configuration
setManager
protected void setManager(PageManager manager)
- JspServlet and XtpServlet will set the PageManager with this method.
getServletContext
public ServletContext getServletContext()
- Override the Servlet method to return the generated application.
- Overrides:
getServletContext
in class GenericServlet
service
public void service(ServletRequest req,
ServletResponse res)
throws ServletException,
java.io.IOException
- The service method gets the JSP/XTP page and executes it. The
request and response objects are converted to Caucho objects so
other servlet runners will produce the same results as the Caucho
servlet runner.
- Following copied from interface:
javax.servlet.Servlet
- Parameters:
req
- request information. Normally servlets will cast this
to HttpServletRequest
res
- response information. Normally servlets will cast this
to HttpServletRequest
getPage
public Page getPage(CauchoRequest request,
CauchoResponse response)
throws java.lang.Exception
- Creates and returns a new page.
- Parameters:
request
- the servlet requestresponse
- the servlet response- Returns:
- the compiled page
destroy
public void destroy()
- Description copied from class:
GenericServlet
- Called when the servlet (and the application) shuts down.
- Overrides:
destroy
in class GenericServlet