public final class HTMLManagerServlet extends ManagerServlet
The difference between the ManagerServlet
and this
Servlet is that this Servlet prints out a HTML interface which
makes it easier to administrate.
However if you use a software that parses the output of
ManagerServlet
you won't be able to upgrade
to this Servlet since the output are not in the
same format ar from ManagerServlet
ManagerServlet
,
Serialized FormconfigBase, context, debug, global, host, mBeanServer, oname, sm, versioned, wrapper
Constructor and Description |
---|
HTMLManagerServlet() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
deployInternal(java.lang.String config,
ContextName cn,
java.lang.String war,
StringManager smClient)
Deploy an application for the specified path from the specified
web application archive.
|
protected void |
displaySessionDetailPage(HttpServletRequest req,
HttpServletResponse resp,
ContextName cn,
java.lang.String sessionId,
StringManager smClient) |
protected void |
displaySessionsListPage(ContextName cn,
HttpServletRequest req,
HttpServletResponse resp,
StringManager smClient) |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Process a GET request for the specified resource.
|
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Process a POST request for the specified resource.
|
protected void |
doSessions(ContextName cn,
HttpServletRequest req,
HttpServletResponse resp,
StringManager smClient) |
protected java.lang.String |
expireSessions(ContextName cn,
HttpServletRequest req,
StringManager smClient)
Extract the expiration request parameter
|
protected java.lang.String |
findleaks(StringManager smClient)
Find potential memory leaks caused by web application reload.
|
protected java.util.Comparator<Session> |
getComparator(java.lang.String sortBy) |
java.lang.String |
getServletInfo()
Returns information about the servlet, such as author, version, and
copyright.
|
protected Session |
getSessionForNameAndId(ContextName cn,
java.lang.String id,
StringManager smClient) |
protected java.util.List<Session> |
getSessionsForName(ContextName cn,
StringManager smClient) |
void |
init()
Initialize this servlet.
|
protected int |
invalidateSessions(ContextName cn,
java.lang.String[] sessionIds,
StringManager smClient)
Invalidate HttpSessions
|
protected void |
list(HttpServletRequest request,
HttpServletResponse response,
java.lang.String message,
StringManager smClient)
Render a HTML list of the currently active Contexts in our virtual host,
and memory and server status information.
|
protected java.lang.String |
reload(ContextName cn,
StringManager smClient)
Reload the web application at the specified context path.
|
protected boolean |
removeSessionAttribute(ContextName cn,
java.lang.String sessionId,
java.lang.String attributeName,
StringManager smClient)
Removes an attribute from an HttpSession
|
protected java.lang.String |
sessions(ContextName cn,
int idle,
StringManager smClient)
Display session information and invoke list.
|
protected void |
sslConnectorCiphers(HttpServletRequest request,
HttpServletResponse response) |
protected java.lang.String |
start(ContextName cn,
StringManager smClient)
Start the web application at the specified context path.
|
protected java.lang.String |
stop(ContextName cn,
StringManager smClient)
Stop the web application at the specified context path.
|
protected java.lang.String |
undeploy(ContextName cn,
StringManager smClient)
Undeploy the web application at the specified context path.
|
protected java.lang.String |
upload(HttpServletRequest request,
StringManager smClient) |
addServiced, check, copy, copyInternal, deploy, deploy, deploy, destroy, doPut, expireSessions, findleaks, getConnectorCiphers, getWrapper, isDeployed, isServiced, list, printResources, reload, removeServiced, resources, save, serverinfo, sessions, setWrapper, sslConnectorCiphers, start, stop, threadDump, undeploy, undeployDir, uploadWar, validateContextName, vmInfo
doDelete, doHead, doOptions, doTrace, getLastModified, service, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
public void doGet(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException
doGet
in class ManagerServlet
request
- The servlet request we are processingresponse
- The servlet response we are creatingjava.io.IOException
- if an input/output error occursServletException
- if a servlet-specified error occursServletResponse.setContentType(java.lang.String)
public void doPost(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException
doPost
in class HttpServlet
request
- The servlet request we are processingresponse
- The servlet response we are creatingjava.io.IOException
- if an input/output error occursServletException
- if a servlet-specified error occursServletOutputStream
,
ServletResponse.setContentType(java.lang.String)
protected java.lang.String upload(HttpServletRequest request, StringManager smClient)
protected java.lang.String deployInternal(java.lang.String config, ContextName cn, java.lang.String war, StringManager smClient)
config
- URL of the context configuration file to be deployedcn
- Name of the application to be deployedwar
- URL of the web application archive to be deployedprotected void list(HttpServletRequest request, HttpServletResponse response, java.lang.String message, StringManager smClient) throws java.io.IOException
request
- The requestresponse
- The responsemessage
- a message to displayjava.io.IOException
protected java.lang.String reload(ContextName cn, StringManager smClient)
cn
- Name of the application to be restartedsmClient
- StringManager for the client's localeManagerServlet.reload(PrintWriter, ContextName, StringManager)
protected java.lang.String undeploy(ContextName cn, StringManager smClient)
cn
- Name of the application to be undeployedsmClient
- StringManager for the client's localeManagerServlet.undeploy(PrintWriter, ContextName, StringManager)
protected java.lang.String sessions(ContextName cn, int idle, StringManager smClient)
cn
- Name of the application to list session informationidle
- Expire all sessions with idle time ≥ idle for this contextsmClient
- StringManager for the client's localeManagerServlet.sessions(PrintWriter, ContextName, int,
StringManager)
protected java.lang.String start(ContextName cn, StringManager smClient)
cn
- Name of the application to be startedsmClient
- StringManager for the client's localeManagerServlet.start(PrintWriter, ContextName, StringManager)
protected java.lang.String stop(ContextName cn, StringManager smClient)
cn
- Name of the application to be stoppedsmClient
- StringManager for the client's localeManagerServlet.stop(PrintWriter, ContextName, StringManager)
protected java.lang.String findleaks(StringManager smClient)
smClient
- StringManager for the client's localeManagerServlet.findleaks(boolean, PrintWriter, StringManager)
protected void sslConnectorCiphers(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
public java.lang.String getServletInfo()
javax.servlet.GenericServlet
Servlet.getServletInfo()
.getServletInfo
in interface Servlet
getServletInfo
in class GenericServlet
Servlet.getServletInfo()
public void init() throws ServletException
ManagerServlet
init
in class ManagerServlet
ServletException
- if an exception occurs that interrupts the servlet's
normal operationGenericServlet.init()
protected java.lang.String expireSessions(ContextName cn, HttpServletRequest req, StringManager smClient)
cn
- Name of the application from which to expire sessionsreq
- smClient
- StringManager for the client's localeprotected void doSessions(ContextName cn, HttpServletRequest req, HttpServletResponse resp, StringManager smClient) throws ServletException, java.io.IOException
req
- resp
- smClient
- StringManager for the client's localeServletException
java.io.IOException
protected java.util.List<Session> getSessionsForName(ContextName cn, StringManager smClient)
protected Session getSessionForNameAndId(ContextName cn, java.lang.String id, StringManager smClient)
protected void displaySessionsListPage(ContextName cn, HttpServletRequest req, HttpServletResponse resp, StringManager smClient) throws ServletException, java.io.IOException
cn
- Name of the application for which the sessions will be listedreq
- resp
- smClient
- StringManager for the client's localeServletException
java.io.IOException
protected void displaySessionDetailPage(HttpServletRequest req, HttpServletResponse resp, ContextName cn, java.lang.String sessionId, StringManager smClient) throws ServletException, java.io.IOException
req
- resp
- smClient
- StringManager for the client's localeServletException
java.io.IOException
protected int invalidateSessions(ContextName cn, java.lang.String[] sessionIds, StringManager smClient) throws java.io.IOException
cn
- Name of the application for which sessions are to be
invalidatedsessionIds
- smClient
- StringManager for the client's localejava.io.IOException
protected boolean removeSessionAttribute(ContextName cn, java.lang.String sessionId, java.lang.String attributeName, StringManager smClient) throws java.io.IOException
cn
- Name of the application hosting the session from which the
attribute is to be removedsessionId
- attributeName
- smClient
- StringManager for the client's localejava.io.IOException
protected java.util.Comparator<Session> getComparator(java.lang.String sortBy)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.