|
||||||
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.opencms.main.OpenCmsServlet
public class OpenCmsServlet
This the main servlet of the OpenCms system.
From here, all operations that are results of HTTP requests are invoked. Any incoming request is handled in multiple steps:
CmsUser
is authenticated
and a CmsObject
with this users context information
is created. This CmsObject
is used to access all functions of OpenCms, limited by
the authenticated users permissions. If the user is not identified, it is set to the default user, usually named "Guest".CmsResource
is loaded into OpenCms and depending on its type
(and the users persmissions to display or modify it),
it is send to one of the OpenCms I_CmsResourceLoader
implementations
do be processed.I_CmsResourceLoader
will then decide what to do with the
contents of the requested CmsResource
.
In case of a JSP resource the JSP handling mechanism is invoked with the CmsJspLoader
,
in case of an image (or another static resource) this will be returned by the CmsDumpLoader
etc.
CmsShell
,
CmsObject
,
OpenCms
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
SERVLET_PARAM_DEFAULT_WEB_APPLICATION
Name of the DefaultWebApplication parameter in the web.xml OpenCms servlet configuration. |
static java.lang.String |
SERVLET_PARAM_OPEN_CMS_HOME
Name of the OpenCmsHome parameter in the web.xml OpenCms servlet configuration. |
static java.lang.String |
SERVLET_PARAM_OPEN_CMS_SERVLET
Name of the OpenCmsServlet parameter in the web.xml OpenCms servlet configuration. |
static java.lang.String |
SERVLET_PARAM_WEB_APPLICATION_CONTEXT
Name of the WebApplicationContext parameter in the web.xml OpenCms servlet configuration. |
Constructor Summary | |
---|---|
OpenCmsServlet()
|
Method Summary | |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
OpenCms servlet main request handling method. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
OpenCms servlet POST request handling method, will just call doGet(HttpServletRequest, HttpServletResponse) . |
java.lang.String[] |
getHandlerNames()
Returns the handler name. |
void |
handle(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
java.lang.String name)
Handles an OpenCms request. |
void |
init(javax.servlet.ServletConfig config)
|
protected void |
invokeHandler(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Manages requests to internal OpenCms request handlers. |
protected void |
openErrorHandler(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
int errorCode)
Displays an error code handler loaded from the OpenCms VFS, or if such a page does not exist, displays the default servlet container error code. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, 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 |
---|
public static final java.lang.String SERVLET_PARAM_DEFAULT_WEB_APPLICATION
DefaultWebApplication
parameter in the web.xml
OpenCms servlet configuration.
public static final java.lang.String SERVLET_PARAM_OPEN_CMS_HOME
OpenCmsHome
parameter in the web.xml
OpenCms servlet configuration.
public static final java.lang.String SERVLET_PARAM_OPEN_CMS_SERVLET
OpenCmsServlet
parameter in the web.xml
OpenCms servlet configuration.
public static final java.lang.String SERVLET_PARAM_WEB_APPLICATION_CONTEXT
WebApplicationContext
parameter in the web.xml
OpenCms servlet configuration.
Constructor Detail |
---|
public OpenCmsServlet()
Method Detail |
---|
public void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.io.IOException, javax.servlet.ServletException
doGet
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
HttpServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.io.IOException, javax.servlet.ServletException
doGet(HttpServletRequest, HttpServletResponse)
.
doPost
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
HttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public java.lang.String[] getHandlerNames()
I_CmsRequestHandler
getHandlerNames
in interface I_CmsRequestHandler
I_CmsRequestHandler.getHandlerNames()
public void handle(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String name) throws java.io.IOException, javax.servlet.ServletException
I_CmsRequestHandler
handle
in interface I_CmsRequestHandler
req
- the current requestres
- the current responsename
- the handler name to invoke
java.io.IOException
- in case an error occurs
javax.servlet.ServletException
- in case an error occursI_CmsRequestHandler.handle(HttpServletRequest, HttpServletResponse, String)
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
Servlet.init(javax.servlet.ServletConfig)
protected void invokeHandler(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.io.IOException, javax.servlet.ServletException
req
- the current requestres
- the current response
javax.servlet.ServletException
- in case an error occurs
javax.servlet.ServletException
- in case an error occurs
java.io.IOException
- in case an error occursprotected void openErrorHandler(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, int errorCode) throws java.io.IOException, javax.servlet.ServletException
req
- the current requestres
- the current responseerrorCode
- the error code to display
java.io.IOException
- if something goes wrong
javax.servlet.ServletException
- if something goes wrong
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |