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 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)
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 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 specified sessions.
|
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
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 deployedsmClient
- internationalized stringsprotected void list(HttpServletRequest request, HttpServletResponse response, String message, StringManager smClient) throws IOException
request
- The requestresponse
- The responsemessage
- a message to displaysmClient
- internationalized stringsIOException
- an IO error occurredprotected 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
- The Servlet requestsmClient
- StringManager for the client's localeprotected void doSessions(ContextName cn, HttpServletRequest req, HttpServletResponse resp, StringManager smClient) throws ServletException, IOException
cn
- Name of the application for the sessions operationreq
- The Servlet requestresp
- The Servlet responsesmClient
- StringManager for the client's localeServletException
- Propagated Servlet errorIOException
- An IO error occurredprotected 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
- The Servlet requestresp
- The Servlet responsesmClient
- StringManager for the client's localeServletException
- Propagated Servlet errorIOException
- An IO error occurredprotected void displaySessionDetailPage(HttpServletRequest req, HttpServletResponse resp, ContextName cn, String sessionId, StringManager smClient) throws ServletException, 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 errorIOException
- An IO error occurredprotected int invalidateSessions(ContextName cn, 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, String sessionId, 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 Comparator<Session> getComparator(String sortBy)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.