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)
Display session details.
|
protected void |
displaySessionsListPage(ContextName cn,
HttpServletRequest req,
HttpServletResponse resp,
StringManager smClient)
List session.
|
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)
Handle session operations.
|
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 specified sessions.
|
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 |
sslConnectorCerts(HttpServletRequest request,
HttpServletResponse response) |
protected void |
sslConnectorCiphers(HttpServletRequest request,
HttpServletResponse response) |
protected void |
sslConnectorTrustedCerts(HttpServletRequest request,
HttpServletResponse response) |
protected java.lang.String |
sslReload(java.lang.String tlsHostName,
StringManager smClient) |
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, getConnectorCerts, getConnectorCiphers, getConnectorTrustedCerts, getWrapper, isDeployed, isServiced, list, printResources, reload, removeServiced, resources, save, serverinfo, sessions, setWrapper, sslConnectorCiphers, sslReload, 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 deployedsmClient
- internationalized stringsprotected void list(HttpServletRequest request, HttpServletResponse response, java.lang.String message, StringManager smClient) throws java.io.IOException
request
- The requestresponse
- The responsemessage
- a message to displaysmClient
- internationalized stringsjava.io.IOException
- an IO error occurredprotected 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 java.lang.String sslReload(java.lang.String tlsHostName, StringManager smClient)
protected void sslConnectorCiphers(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
protected void sslConnectorCerts(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
protected void sslConnectorTrustedCerts(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
- The Servlet requestsmClient
- StringManager for the client's localeprotected void doSessions(ContextName cn, HttpServletRequest req, HttpServletResponse resp, StringManager smClient) throws ServletException, java.io.IOException
cn
- Name of the application for the sessions operationreq
- The Servlet requestresp
- The Servlet responsesmClient
- StringManager for the client's localeServletException
- Propagated Servlet errorjava.io.IOException
- An IO error occurredprotected 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
- The Servlet requestresp
- The Servlet responsesmClient
- StringManager for the client's localeServletException
- Propagated Servlet errorjava.io.IOException
- An IO error occurredprotected void displaySessionDetailPage(HttpServletRequest req, HttpServletResponse resp, ContextName cn, java.lang.String sessionId, StringManager smClient) throws ServletException, java.io.IOException
req
- The Servlet requestresp
- The Servlet responsecn
- Name of the application for which the sessions will be listedsessionId
- the session idsmClient
- StringManager for the client's localeServletException
- Propagated Servlet errorjava.io.IOException
- An IO error occurredprotected int invalidateSessions(ContextName cn, java.lang.String[] sessionIds, StringManager smClient)
cn
- Name of the application for which sessions are to be
invalidatedsessionIds
- the session ids of the sessionssmClient
- StringManager for the client's localeprotected boolean removeSessionAttribute(ContextName cn, java.lang.String sessionId, java.lang.String attributeName, StringManager smClient)
cn
- Name of the application hosting the session from which the
attribute is to be removedsessionId
- the session idattributeName
- the attribute namesmClient
- StringManager for the client's localeprotected java.util.Comparator<Session> getComparator(java.lang.String sortBy)
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.