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 FormModifier and Type | Field and Description |
---|---|
protected static String |
APPLICATION_ERROR |
protected static String |
APPLICATION_MESSAGE |
protected static String |
connectorCiphersJspPath |
protected static String |
sessionDetailJspPath |
protected static String |
sessionsListJspPath |
protected static URLEncoder |
URL_ENCODER |
configBase, context, debug, global, host, mBeanServer, oname, sm, versioned, wrapper
Constructor and Description |
---|
HTMLManagerServlet() |
Modifier and Type | Method and Description |
---|---|
protected String |
deployInternal(String config,
ContextName cn,
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,
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 String |
expireSessions(ContextName cn,
HttpServletRequest req,
StringManager smClient)
Extract the expiration request parameter
|
protected String |
findleaks(StringManager smClient)
Find potential memory leaks caused by web application reload.
|
protected Comparator<Session> |
getComparator(String sortBy) |
String |
getServletInfo()
Returns information about the servlet, such as author, version, and
copyright.
|
protected Session |
getSessionForNameAndId(ContextName cn,
String id,
StringManager smClient) |
protected List<Session> |
getSessionsForName(ContextName cn,
StringManager smClient) |
void |
init()
Initialize this servlet.
|
protected int |
invalidateSessions(ContextName cn,
String[] sessionIds,
StringManager smClient)
Invalidate HttpSessions
|
protected void |
list(HttpServletRequest request,
HttpServletResponse response,
String message,
StringManager smClient)
Render a HTML list of the currently active Contexts in our virtual host,
and memory and server status information.
|
protected String |
reload(ContextName cn,
StringManager smClient)
Reload the web application at the specified context path.
|
protected boolean |
removeSessionAttribute(ContextName cn,
String sessionId,
String attributeName,
StringManager smClient)
Removes an attribute from an HttpSession
|
protected String |
sessions(ContextName cn,
int idle,
StringManager smClient)
Display session information and invoke list.
|
protected void |
sslConnectorCiphers(HttpServletRequest request,
HttpServletResponse response) |
protected String |
start(ContextName cn,
StringManager smClient)
Start the web application at the specified context path.
|
protected String |
stop(ContextName cn,
StringManager smClient)
Stop the web application at the specified context path.
|
protected String |
undeploy(ContextName cn,
StringManager smClient)
Undeploy the web application at the specified context path.
|
protected 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
protected static final URLEncoder URL_ENCODER
protected static final String APPLICATION_MESSAGE
protected static final String APPLICATION_ERROR
protected static final String sessionsListJspPath
protected static final String sessionDetailJspPath
protected static final String connectorCiphersJspPath
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
doGet
in class ManagerServlet
request
- The servlet request we are processingresponse
- The servlet response we are creatingIOException
- if an input/output error occursServletException
- if a servlet-specified error occursServletResponse.setContentType(java.lang.String)
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
doPost
in class HttpServlet
request
- The servlet request we are processingresponse
- The servlet response we are creatingIOException
- if an input/output error occursServletException
- if a servlet-specified error occursServletOutputStream
,
ServletResponse.setContentType(java.lang.String)
protected String upload(HttpServletRequest request, StringManager smClient)
protected String deployInternal(String config, ContextName cn, 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, String message, StringManager smClient) throws IOException
request
- The requestresponse
- The responsemessage
- a message to displayIOException
protected 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 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 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 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 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 String findleaks(StringManager smClient)
smClient
- StringManager for the client's localeManagerServlet.findleaks(boolean, PrintWriter, StringManager)
protected void sslConnectorCiphers(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
ServletException
IOException
public 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 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, IOException
req
- resp
- smClient
- StringManager for the client's localeServletException
IOException
protected List<Session> getSessionsForName(ContextName cn, StringManager smClient)
protected Session getSessionForNameAndId(ContextName cn, String id, StringManager smClient)
protected void displaySessionsListPage(ContextName cn, HttpServletRequest req, HttpServletResponse resp, StringManager smClient) throws ServletException, IOException
cn
- Name of the application for which the sessions will be listedreq
- resp
- smClient
- StringManager for the client's localeServletException
IOException
protected void displaySessionDetailPage(HttpServletRequest req, HttpServletResponse resp, ContextName cn, String sessionId, StringManager smClient) throws ServletException, IOException
req
- resp
- smClient
- StringManager for the client's localeServletException
IOException
protected int invalidateSessions(ContextName cn, String[] sessionIds, StringManager smClient) throws IOException
cn
- Name of the application for which sessions are to be
invalidatedsessionIds
- smClient
- StringManager for the client's localeIOException
protected boolean removeSessionAttribute(ContextName cn, String sessionId, String attributeName, StringManager smClient) throws IOException
cn
- Name of the application hosting the session from which the
attribute is to be removedsessionId
- attributeName
- smClient
- StringManager for the client's localeIOException
protected Comparator<Session> getComparator(String sortBy)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.