public class ServletUtil extends Object
| 构造器和说明 |
|---|
ServletUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Boolean |
getBoolean(String name)
获取Boolean参数
|
static Boolean |
getBoolean(String name,
Boolean defaultValue)
获取Boolean参数
|
static Integer |
getInteger(String name)
获取Integer参数
|
static Integer |
getInteger(String name,
Integer defaultValue)
获取Integer参数
|
static Long |
getLong(String name) |
static Long |
getLong(String name,
Long defaultValue) |
static String |
getParameter(String name)
获取String参数
|
static String |
getParameter(String name,
String defaultValue)
获取String参数
|
static javax.servlet.http.HttpServletRequest |
getRequest()
获取request
|
static org.springframework.web.context.request.ServletRequestAttributes |
getRequestAttributes() |
static javax.servlet.http.HttpServletResponse |
getResponse()
获取response
|
static javax.servlet.http.HttpSession |
getSession()
获取session
|
static String |
urlDecode(String str)
URL解码
|
static String |
urlEncode(String str)
URL编码
|
static String |
WriteJsonString(javax.servlet.http.HttpServletResponse response,
String string)
将字符串写到客户端
|
public static javax.servlet.http.HttpServletRequest getRequest()
public static javax.servlet.http.HttpServletResponse getResponse()
public static javax.servlet.http.HttpSession getSession()
public static org.springframework.web.context.request.ServletRequestAttributes getRequestAttributes()
public static String WriteJsonString(javax.servlet.http.HttpServletResponse response, String string)
response - 渲染对象string - 待渲染的字符串Copyright © 2025. All rights reserved.