|
|||||||||||
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
org.apache.cocoon.servlet.CocoonServlet
This is the entry point for Cocoon execution as an HTTP Servlet.
Nested Class Summary | |
protected static class |
CocoonServlet.ServletBootstrapEnvironment
|
Field Summary | |
protected Cocoon |
cocoon
The Cocoon instance |
static String |
CONTEXT_SERVLET_CONFIG
Application Context Key for the servlet configuration |
protected CoreUtil |
coreUtil
CoreUtil |
protected Context |
environmentContext
|
protected Exception |
exception
Holds exception happened during initialization (if any) |
protected Logger |
log
The logger |
protected static String |
PROCESSED_BY
|
protected RequestFactory |
requestFactory
The RequestFactory is responsible for wrapping multipart-encoded forms and for handing the file payload of incoming requests |
protected ServletContext |
servletContext
|
protected String |
servletContextPath
This is the path to the servlet context (or the result of calling getRealPath('/') on the ServletContext. |
protected String |
servletContextURL
This is the url to the servlet context directory |
Constructor Summary | |
CocoonServlet()
|
Method Summary | |
void |
destroy()
Dispose Cocoon when servlet is destroyed |
protected Environment |
getEnvironment(String uri,
HttpServletRequest req,
HttpServletResponse res)
Create the environment for the request |
String |
getInitParameter(String name)
Get an initialisation parameter. |
protected String |
getInitParameter(String name,
String defaultValue)
Convenience method to access servlet parameters |
protected Logger |
getLogger()
|
void |
init(ServletConfig conf)
Initialize this CocoonServlet instance. |
protected void |
manageException(HttpServletRequest req,
HttpServletResponse res,
Environment env,
String uri,
int errorStatus,
String title,
String message,
String description,
Exception e)
|
void |
service(HttpServletRequest req,
HttpServletResponse res)
Process the specified HttpServletRequest producing output
on the specified HttpServletResponse . |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String CONTEXT_SERVLET_CONFIG
Context
Key for the servlet configuration
protected static final String PROCESSED_BY
protected Cocoon cocoon
Cocoon
instance
protected Exception exception
protected ServletContext servletContext
protected String servletContextPath
protected String servletContextURL
protected RequestFactory requestFactory
protected CoreUtil coreUtil
protected Logger log
protected Context environmentContext
Constructor Detail |
public CocoonServlet()
Method Detail |
public void init(ServletConfig conf) throws ServletException
CocoonServlet
instance. You will
notice that I have broken the init into sub methods to make it
easier to maintain (BL). The context is passed to a couple of
the subroutines. This is also because it is better to explicitly
pass variables than implicitely. It is both more maintainable,
and more elegant.
conf
- The ServletConfig object from the servlet engine.
ServletException
public void destroy()
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
HttpServletRequest
producing output
on the specified HttpServletResponse
.
ServletException
IOException
protected void manageException(HttpServletRequest req, HttpServletResponse res, Environment env, String uri, int errorStatus, String title, String message, String description, Exception e) throws IOException
IOException
protected Environment getEnvironment(String uri, HttpServletRequest req, HttpServletResponse res) throws Exception
Exception
public String getInitParameter(String name)
protected String getInitParameter(String name, String defaultValue)
protected Logger getLogger()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |