public class RuntimeServlet extends javax.servlet.http.HttpServlet
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
RuntimeServlet.RunMode
The run modes 
 | 
| Modifier and Type | Field and Description | 
|---|---|
private Collection<Pattern> | 
_allowedURLPattern  | 
private File | 
_ametysHome  | 
private AmetysHomeLock | 
_ametysHomeLock  | 
private DefaultContext | 
_avalonContext  | 
private File | 
_cacheDir  | 
private Cocoon | 
_cocoon  | 
private HttpContext | 
_context  | 
private Exception | 
_exception  | 
private Logger | 
_logger  | 
private LoggerManager | 
_loggerManager  | 
private int | 
_maxUploadSize  | 
private static RuntimeServlet.RunMode | 
_mode  | 
private RequestFactory | 
_requestFactory  | 
private javax.servlet.ServletContext | 
_servletContext  | 
private String | 
_servletContextPath  | 
private URL | 
_servletContextURL  | 
private File | 
_uploadDir  | 
private File | 
_workDir  | 
static String | 
AMETYS_HOME_DEFAULT
The default ametys home path (relative to the servlet context) 
 | 
static String | 
AMETYS_HOME_PROPERTY
Name of the servlet initialization parameter for the ametys home property 
 | 
static String | 
COCOON_CONF_URL
The cocoon.xconf URL 
 | 
static String | 
CONFIG_FILE_NAME
The config file name 
 | 
static String | 
CONTEXT_CONTEXT_ROOT
Constant for storing the servlet context URL in the Avalon context 
 | 
static String | 
CONTEXT_SERVLET_CONFIG
Constant for storing the  
ServletConfig in the Avalon context | 
static int | 
DEFAULT_MAX_UPLOAD_SIZE
Default max upload size (10 Mb) 
 | 
| Constructor and Description | 
|---|
RuntimeServlet()  | 
| Modifier and Type | Method and Description | 
|---|---|
private void | 
_createCocoon()  | 
private void | 
_disposeCocoon()  | 
private void | 
_fireRequestEnded(javax.servlet.http.HttpServletRequest req)  | 
private void | 
_fireRequestStarted(javax.servlet.http.HttpServletRequest req)  | 
private void | 
_initAmetys()  | 
private void | 
_initAmetysHome()  | 
private void | 
_initLogger()  | 
private void | 
_initPlugins()  | 
private void | 
_loadRuntimeConfig()  | 
private void | 
_renderError(javax.servlet.http.HttpServletRequest req,
            javax.servlet.http.HttpServletResponse res,
            Throwable throwable,
            String message)  | 
private String | 
_retrieveUri(javax.servlet.http.HttpServletRequest req)  | 
void | 
destroy()  | 
static RuntimeServlet.RunMode | 
getRunMode()
Get the run mode 
 | 
void | 
init()  | 
void | 
restartCocoon(javax.servlet.http.HttpServletRequest req)
Restart cocoon 
 | 
void | 
service(javax.servlet.http.HttpServletRequest req,
       javax.servlet.http.HttpServletResponse res)  | 
static void | 
setRunMode(RuntimeServlet.RunMode mode)
Set the run mode 
 | 
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic static final String CONTEXT_SERVLET_CONFIG
ServletConfig in the Avalon contextpublic static final String CONTEXT_CONTEXT_ROOT
public static final String COCOON_CONF_URL
public static final int DEFAULT_MAX_UPLOAD_SIZE
public static final String CONFIG_FILE_NAME
public static final String AMETYS_HOME_PROPERTY
public static final String AMETYS_HOME_DEFAULT
private static RuntimeServlet.RunMode _mode
private javax.servlet.ServletContext _servletContext
private String _servletContextPath
private URL _servletContextURL
private DefaultContext _avalonContext
private HttpContext _context
private RequestFactory _requestFactory
private int _maxUploadSize
private File _uploadDir
private File _ametysHome
private AmetysHomeLock _ametysHomeLock
private LoggerManager _loggerManager
private Exception _exception
private Collection<Pattern> _allowedURLPattern
public RuntimeServlet()
public void init() throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprivate void _initAmetysHome() throws AmetysHomeLockException
AmetysHomeLockExceptionprivate void _initAmetys() throws Exception
Exceptionprivate void _initLogger()
private void _createCocoon() throws Exception
Exceptionprivate void _initPlugins() throws Exception
Exceptionprivate void _loadRuntimeConfig() throws javax.servlet.ServletException
javax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletprivate final void _disposeCocoon()
public final void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
service in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic void restartCocoon(javax.servlet.http.HttpServletRequest req)
req - The http servlet request, used to read safeMode and normalMode
            request attribute if possible. If null, safe mode will be
            forced only if it was alread forced.private String _retrieveUri(javax.servlet.http.HttpServletRequest req)
private void _fireRequestStarted(javax.servlet.http.HttpServletRequest req)
private void _fireRequestEnded(javax.servlet.http.HttpServletRequest req)
public static void setRunMode(RuntimeServlet.RunMode mode)
mode - the running modepublic static RuntimeServlet.RunMode getRunMode()
private void _renderError(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, Throwable throwable, String message) throws javax.servlet.ServletException
javax.servlet.ServletException