public abstract class BasicServlet
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
BasicServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
banner(StringBuilder sb,
String klass,
String text) |
protected static javax.servlet.http.Cookie |
createCookie(String name,
String value)
Creates a
Cookie with the given name and value, also setting the HttpOnly attribute on
the cookie. |
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) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceprotected abstract String getTitle(javax.servlet.http.HttpServletRequest req)
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic static final void setCookie(javax.servlet.http.HttpServletResponse resp,
String name,
String value)
public static final String getCookieValue(javax.servlet.http.HttpServletRequest req, String name)
protected void pageStart(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
throws Exception
Exceptionprotected void pageBody(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
throws Exception
Exceptionprotected void pageEnd(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
StringBuilder sb)
throws Exception
Exceptionprotected String getBodyAttributes()
public static String currentPage(javax.servlet.http.HttpServletRequest req)
protected static void banner(StringBuilder sb, String klass, String text)
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.