|
|||||||||
| 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.mmbase.servlet.MMBaseServlet
MMBaseServlet is a base class for other MMBase servlets (like ImageServlet). Its main goal is to store a MMBase instance for all its descendants, but it can also be used as a serlvet itself, to show MMBase version information.
| Field Summary | |
protected static MMBase |
mmbase
|
| Constructor Summary | |
MMBaseServlet()
|
|
| Method Summary | |
protected static void |
associateMapping(java.lang.String function,
java.lang.String servletMapping,
java.lang.Integer priority)
Associate a given servletmapping with the given function. |
protected void |
decRefCount(javax.servlet.http.HttpServletRequest req)
Decrease the reference count of the servlet |
void |
destroy()
|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Serves MMBase version information. |
protected java.util.Map |
getAssociations()
On default, servlets are not associated with any function. |
MMBase |
getMMBase()
Returns the currently set MMBase object. |
protected static java.lang.String |
getRequestURL(javax.servlet.http.HttpServletRequest req)
Return URI with QueryString appended |
static java.lang.String |
getServletByAssociation(java.lang.String function)
Gets the name of the servlet that performs actions associated with the the given function. |
static javax.servlet.http.HttpServlet |
getServletByMapping(java.lang.String mapping)
Gets the servlet that belongs to the given mapping |
java.lang.String |
getServletInfo()
Returns information about this servlet. |
static java.util.List |
getServletMappings(java.lang.String servletName)
Gets all the mappings for a given servlet. |
static java.util.List |
getServletMappingsByAssociation(java.lang.String function)
Gets all the mappings for a given association. |
protected void |
incRefCount(javax.servlet.http.HttpServletRequest req)
Increase the reference count of the servlet (for debugging) and send running servlets to log once every 32 requests |
void |
init()
The init of an MMBaseServlet checks if MMBase is running. |
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
The service method is extended with calls for the refCount functionality (for performance related debugging). |
void |
setInitException(javax.servlet.ServletException e)
If something went wrong (an exception occured), the caller may is informed by a call to this method. |
void |
setMMBase(MMBase mmb)
Set MMBase object after initializion, in the caller. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
| Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static MMBase mmbase
| Constructor Detail |
public MMBaseServlet()
| Method Detail |
protected java.util.Map getAssociations()
public MMBase getMMBase()
org.mmbase.servlet.MMBaseStarter
getMMBase in interface org.mmbase.servlet.MMBaseStarterpublic void setMMBase(MMBase mmb)
org.mmbase.servlet.MMBaseStarter
setMMBase in interface org.mmbase.servlet.MMBaseStarterpublic void setInitException(javax.servlet.ServletException e)
org.mmbase.servlet.MMBaseStarter
setInitException in interface org.mmbase.servlet.MMBaseStarter
public void init()
throws javax.servlet.ServletException
javax.servlet.ServletExceptionpublic static javax.servlet.http.HttpServlet getServletByMapping(java.lang.String mapping)
mapping - the mapping used to access the servlet
public static java.util.List getServletMappings(java.lang.String servletName)
servletName - the name of the servlet
public static java.util.List getServletMappingsByAssociation(java.lang.String function)
function - the function that identifies the type of association
public static java.lang.String getServletByAssociation(java.lang.String function)
function - the function that identifies the type of association
protected static void associateMapping(java.lang.String function,
java.lang.String servletMapping,
java.lang.Integer priority)
function - the function that identifies the type of associationservletMapping - mapping of the servlet to associate with the functionpriority - priority of this association, the association only occurs if no servlet or servletmapping
with higher priority for the same function is present already
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
javax.servlet.ServletException
java.io.IOException
public void service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
javax.servlet.ServletException
java.io.IOExceptionpublic java.lang.String getServletInfo()
getServletInfo in interface javax.servlet.Servletprotected static java.lang.String getRequestURL(javax.servlet.http.HttpServletRequest req)
req - The HttpServletRequest.protected void decRefCount(javax.servlet.http.HttpServletRequest req)
req - The HttpServletRequest.protected void incRefCount(javax.servlet.http.HttpServletRequest req)
req - The HttpServletRequest.public void destroy()
destroy in interface javax.servlet.Servlet
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||