org.apache.accumulo.monitor.servlets
Class BasicServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.accumulo.monitor.servlets.BasicServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- DefaultServlet, GcStatusServlet, JSONServlet, ListType, LogServlet, MasterServlet, OperationServlet, ProblemServlet, ScanServlet, ShellServlet, ShowTrace, Summary, TablesServlet, TServersServlet, VisServlet, XMLServlet
public abstract class BasicServlet
- extends javax.servlet.http.HttpServlet
- See Also:
- Serialized Form
|
Field Summary |
protected static org.apache.log4j.Logger |
log
|
|
Method Summary |
protected static void |
banner(StringBuilder sb,
String klass,
String text)
|
static String |
currentPage(javax.servlet.http.HttpServletRequest req)
|
static String |
decode(String s)
|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
static String |
encode(String s)
|
protected String |
getBodyAttributes()
Allow the concrete servlet implementation to provide attributes on the body HTML tag, such as 'onload', which can be used to call Javascript methods on
page load. |
static String |
getCookieValue(javax.servlet.http.HttpServletRequest req,
String name)
|
protected abstract String |
getTitle(javax.servlet.http.HttpServletRequest req)
|
protected void |
pageBody(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
|
protected void |
pageEnd(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
|
protected void |
pageStart(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
|
static String |
sanitize(String xml)
|
static void |
setCookie(javax.servlet.http.HttpServletResponse resp,
String name,
String value)
|
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.log4j.Logger log
BasicServlet
public BasicServlet()
getTitle
protected abstract String getTitle(javax.servlet.http.HttpServletRequest req)
doGet
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
setCookie
public static final void setCookie(javax.servlet.http.HttpServletResponse resp,
String name,
String value)
getCookieValue
public static final String getCookieValue(javax.servlet.http.HttpServletRequest req,
String name)
pageStart
protected void pageStart(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
throws Exception
- Throws:
Exception
pageBody
protected void pageBody(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
throws Exception
- Throws:
Exception
pageEnd
protected void pageEnd(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
throws Exception
- Throws:
Exception
getBodyAttributes
protected String getBodyAttributes()
- Allow the concrete servlet implementation to provide attributes on the body HTML tag, such as 'onload', which can be used to call Javascript methods on
page load. By default, nothing is specified.
encode
public static String encode(String s)
decode
public static String decode(String s)
sanitize
public static String sanitize(String xml)
currentPage
public static String currentPage(javax.servlet.http.HttpServletRequest req)
banner
protected static void banner(StringBuilder sb,
String klass,
String text)
Copyright © 2015 Apache Accumulo Project. All rights reserved.