org.apache.cocoon.servlet
Class BootstrapServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.cocoon.servlet.ParanoidCocoonServlet
              extended by org.apache.cocoon.servlet.BootstrapServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class BootstrapServlet
extends ParanoidCocoonServlet

A bootstrap servlet to allow Cocoon to run in servlet engines that aren't fully compliant with the servlet 2.2 spec.

This servlet adds a mandatory "context-dir" parameter to those accepted by CocoonServlet, which should point to Cocoon's context directory (e.g. "/path-to-webapp/cocoon"). This directory is used to :

Version:
CVS $Id: BootstrapServlet.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Sylvain Wallez
See Also:
Serialized Form

Nested Class Summary
static class BootstrapServlet.ConfigWrapper
          Implementation of ServletConfig passed to the actual servlet.
static class BootstrapServlet.ContextWrapper
          Wrapper for the ServletContext passed to the actual servlet.
 
Field Summary
protected  File contextDir
           
 
Fields inherited from class org.apache.cocoon.servlet.ParanoidCocoonServlet
classloader, CONTEXT_PREFIX, DEFAULT_SERVLET_CLASS, FILE_PREFIX, servlet
 
Constructor Summary
BootstrapServlet()
           
 
Method Summary
protected  File getContextDir()
          Get the web application context directory.
protected  void initServlet()
          Initialize the wrapped servlet.
 
Methods inherited from class org.apache.cocoon.servlet.ParanoidCocoonServlet
createClassLoader, destroy, getClassLoader, getClassLoader, getClassPath, getClassPath, init, service
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, 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

contextDir

protected File contextDir
Constructor Detail

BootstrapServlet

public BootstrapServlet()
Method Detail

getContextDir

protected File getContextDir()
                      throws ServletException
Description copied from class: ParanoidCocoonServlet
Get the web application context directory.

Overrides:
getContextDir in class ParanoidCocoonServlet
Returns:
the context dir
Throws:
ServletException

initServlet

protected void initServlet()
                    throws ServletException
Description copied from class: ParanoidCocoonServlet
Initialize the wrapped servlet. Subclasses (see BootstrapServlet change the ServletConfig given to the servlet.

Overrides:
initServlet in class ParanoidCocoonServlet
Throws:
ServletException


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.