类 ServletUtils
- java.lang.Object
-
- net.sinodawn.framework.utils.ServletUtils
-
public abstract class ServletUtils extends Object
-
-
构造器概要
构造器 构造器 说明 ServletUtils()
-
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static voidaddCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String cookieName, String cookieValue)static voidaddCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String cookieName, String cookieValue, int expirySeconds)static StringgetContextPath()static javax.servlet.http.CookiegetCookie(javax.servlet.http.HttpServletRequest request, String cookieName)static StringgetCurrentRawSessionId()static javax.servlet.http.HttpServletRequestgetCurrentRequest()static com.blueconic.browscap.CapabilitiesgetCurrentRequestCapabilities()static Map<String,String>getCurrentRequestParamMap()static javax.servlet.http.HttpServletResponsegetCurrentResponse()static javax.servlet.http.HttpSessiongetCurrentSession()static StringgetRawSessionId(String sessionId)static StringgetRemoteIp(javax.servlet.http.HttpServletRequest request)static StringgetRequestUri()static StringgetRequestUri(javax.servlet.http.HttpServletRequest request)static StringgetRequestUrl()static StringgetRequestUrl(javax.servlet.http.HttpServletRequest request)static javax.servlet.ServletContextgetServletContext()static StringgetServletRootPath()static StringgetUrl(String url, String replativeUrl)static voidresponseError(int httpStatus, String error)static voidresponseError(String error)已过时。static voidresponseError(HttpErrorMessage errorMessage)static voidresponseMessage(javax.servlet.ServletResponse response, int httpStatus, String message)static voidresponseMessage(javax.servlet.ServletResponse response, String message)
-
-
-
方法详细资料
-
getCurrentRequestCapabilities
public static com.blueconic.browscap.Capabilities getCurrentRequestCapabilities()
-
getRemoteIp
public static String getRemoteIp(javax.servlet.http.HttpServletRequest request)
-
getCurrentRequest
public static javax.servlet.http.HttpServletRequest getCurrentRequest()
-
getCurrentResponse
public static javax.servlet.http.HttpServletResponse getCurrentResponse()
-
getCurrentSession
public static javax.servlet.http.HttpSession getCurrentSession()
-
getCurrentRawSessionId
public static String getCurrentRawSessionId()
-
getServletContext
public static javax.servlet.ServletContext getServletContext()
-
getServletRootPath
public static String getServletRootPath()
-
responseError
@Deprecated public static void responseError(String error)
已过时。
-
responseError
public static void responseError(HttpErrorMessage errorMessage)
-
responseError
public static void responseError(int httpStatus, String error)
-
responseMessage
public static void responseMessage(javax.servlet.ServletResponse response, String message)
-
responseMessage
public static void responseMessage(javax.servlet.ServletResponse response, int httpStatus, String message)
-
getRequestUri
public static String getRequestUri()
-
getContextPath
public static String getContextPath()
-
getRequestUri
public static String getRequestUri(javax.servlet.http.HttpServletRequest request)
-
getRequestUrl
public static String getRequestUrl()
-
getRequestUrl
public static String getRequestUrl(javax.servlet.http.HttpServletRequest request)
-
addCookie
public static void addCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String cookieName, String cookieValue)
-
addCookie
public static void addCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String cookieName, String cookieValue, int expirySeconds)
-
getCookie
public static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest request, String cookieName)
-
-