|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.jdon.util.RequestUtil
public class RequestUtil
RequestUtil utility class Good ol' copy-n-paste from http://www.javaworld.com/javaworld/jw-02-2002/ssl/utilityclass.txt which is referenced in the following article: http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-ssl.html
| 构造方法摘要 | |
|---|---|
RequestUtil()
|
|
| 方法摘要 | |
|---|---|
static StringBuilder |
createQueryStringFromMap(Map m,
String ampersand)
Builds a query string from a given map of parameters |
static void |
deleteCookie(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.Cookie cookie,
String path)
Convenience method for deleting a cookie by name |
static String |
encodeURL(String url)
|
static String |
encodeURL(String url,
String enc)
Use the new URLEncoder.encode() method from Java 1.4 if available, else use the old deprecated version. |
static String |
getAppURL(javax.servlet.http.HttpServletRequest request)
Convenience method to get the application's URL based on request variables. |
static String[] |
getAuthCookie(javax.servlet.http.HttpServletRequest request)
|
static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.HttpServletRequest request,
String name)
Convenience method to get a cookie by name |
static String |
getRequestParameters(javax.servlet.http.HttpServletRequest aRequest)
Creates query String from request body parameters |
static void |
reclaimRequestAttributes(javax.servlet.http.HttpServletRequest aRequest)
Returns request attributes from session to request |
static void |
saveAuthCookie(javax.servlet.http.HttpServletResponse response,
String username,
String password)
|
static void |
setCookie(javax.servlet.http.HttpServletResponse response,
String name,
String value,
String path)
Convenience method to set a cookie |
static void |
stowRequestAttributes(javax.servlet.http.HttpServletRequest aRequest)
Stores request attributes in session |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public RequestUtil()
| 方法详细信息 |
|---|
public static String getRequestParameters(javax.servlet.http.HttpServletRequest aRequest)
public static StringBuilder createQueryStringFromMap(Map m,
String ampersand)
m - A map of parametersampersand - String to use for ampersands (e.g. "&" or "&" )
public static void stowRequestAttributes(javax.servlet.http.HttpServletRequest aRequest)
aRequest - the current requestpublic static void reclaimRequestAttributes(javax.servlet.http.HttpServletRequest aRequest)
aRequest - DOCUMENT ME!
public static void saveAuthCookie(javax.servlet.http.HttpServletResponse response,
String username,
String password)
public static String[] getAuthCookie(javax.servlet.http.HttpServletRequest request)
public static void setCookie(javax.servlet.http.HttpServletResponse response,
String name,
String value,
String path)
response - name - value - path -
public static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest request,
String name)
request - the current requestname - the name of the cookie to find
public static void deleteCookie(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.Cookie cookie,
String path)
response - the current web responsecookie - the cookie to deletepublic static String getAppURL(javax.servlet.http.HttpServletRequest request)
public static String encodeURL(String url)
public static String encodeURL(String url,
String enc)
enc - The character encoding the urlencode is performed on.
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||