org.apache.cocoon.servlet
Class ParanoidCocoonServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--org.apache.cocoon.servlet.CocoonServlet
|
+--org.apache.cocoon.servlet.ParanoidCocoonServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class ParanoidCocoonServlet
- extends CocoonServlet
This is the entry point for Cocoon execution as an HTTP Servlet.
It also creates a buffer by loading the whole servlet inside a ClassLoader.
It has been changed to extend CocoonServlet
so that it is
easier to add and change functionality between the two servlets.
The only real differences are the ClassLoader and instantiating Cocoon inside
of it.
- Version:
- CVS $Id: ParanoidCocoonServlet.java,v 1.5.2.1 2002/06/11 13:45:37 sylvain Exp $
- Author:
- Berin Loritsch
- See Also:
- Serialized Form
Fields inherited from class org.apache.cocoon.servlet.CocoonServlet |
allowReload, appContext, classLoader, cocoon, creationTime, exception, forceLoadParameter, forceSystemProperty, hiddenShowTime, initClassLoader, log, logKitManager, PROCESSED_BY, requestFactory, servletContext, servletContextPath, servletContextURL, showTime |
Method Summary |
protected void |
addClassLoaderDirectory(java.lang.String dir)
Adds a directory to the classloader. |
protected void |
addClassLoaderURL(java.net.URL url)
Adds an URL to the classloader. |
protected java.lang.String |
getClassPath()
This builds the important ClassPath used by this Servlet. |
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 |
repositoryLoader
protected RepositoryClassLoader repositoryLoader
ParanoidCocoonServlet
public ParanoidCocoonServlet()
getClassPath
protected java.lang.String getClassPath()
throws javax.servlet.ServletException
- This builds the important ClassPath used by this Servlet. It
does so in a Servlet Engine neutral way. It uses the
ServletContext
's getRealPath
method
to get the Servlet 2.2 identified classes and lib directories.
It iterates through every file in the lib directory and adds
it to the classpath.
Also, we add the files to the ClassLoader for the Cocoon system.
In order to protect ourselves from skitzofrantic classloaders,
we need to work with a known one.
- Overrides:
getClassPath
in class CocoonServlet
- Parameters:
context
- The ServletContext to perform the lookup.- Throws:
javax.servlet.ServletException
-
addClassLoaderURL
protected void addClassLoaderURL(java.net.URL url)
- Adds an URL to the classloader.
- Overrides:
addClassLoaderURL
in class CocoonServlet
addClassLoaderDirectory
protected void addClassLoaderDirectory(java.lang.String dir)
- Adds a directory to the classloader.
- Overrides:
addClassLoaderDirectory
in class CocoonServlet
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.