public class ServletUtilities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DOCTYPE
Some simple time savers.
|
| Constructor and Description |
|---|
ServletUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static void |
alert(javax.servlet.http.HttpServletResponse response,
java.lang.String errMesg)
給做javascript alert
|
static java.lang.String |
filter(java.lang.String input)
Given a string, this method replaces all occurrences of
'<' with '<', all occurrences of '>' with
'>', and (to handle cases that occur inside attribute
values), all occurrences of double quotes with
'"' and all occurrences of '&' with '&'.
|
static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.Cookie[] cookies,
java.lang.String cookieName)
Given an array of cookies and a name, this method tries
to find and return the cookie from the array that has
the given name.
|
static java.lang.String |
getCookieValue(javax.servlet.http.Cookie[] cookies,
java.lang.String cookieName,
java.lang.String defaultValue)
Given an array of Cookies, a name, and a default value,
this method tries to find the value of the cookie with
the given name.
|
static int |
getIntParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String paramName,
int defaultValue)
Read a parameter with the specified name, convert it
to an int, and return it.
|
static java.util.Vector |
getParameterData(javax.servlet.http.HttpServletRequest request)
取 Parameter data 轉換為 Vector 內容以 clsSqlData 為一個key
|
static java.lang.String |
headWithTitle(java.lang.String title) |
public static final java.lang.String DOCTYPE
Taken from Core Servlets and JavaServer Pages from Prentice Hall and Sun Microsystems Press, http://www.coreservlets.com/. © 2000 Marty Hall; may be freely used or adapted.
public static java.lang.String headWithTitle(java.lang.String title)
public static int getIntParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String paramName,
int defaultValue)
public static java.lang.String getCookieValue(javax.servlet.http.Cookie[] cookies,
java.lang.String cookieName,
java.lang.String defaultValue)
public static javax.servlet.http.Cookie getCookie(javax.servlet.http.Cookie[] cookies,
java.lang.String cookieName)
public static java.lang.String filter(java.lang.String input)
public static void alert(javax.servlet.http.HttpServletResponse response,
java.lang.String errMesg)
throws java.io.IOException
response - errMesg - java.io.IOExceptionpublic static java.util.Vector getParameterData(javax.servlet.http.HttpServletRequest request)
request -