org.apache.struts2
类 RequestUtils
java.lang.Object
org.apache.struts2.RequestUtils
public class RequestUtils
- extends Object
Request handling utility class.
方法摘要 |
static String |
getServletPath(javax.servlet.http.HttpServletRequest request)
Retrieves the current request servlet path. |
static String |
getUri(javax.servlet.http.HttpServletRequest request)
Gets the uri from the request |
RequestUtils
public RequestUtils()
getServletPath
public static String getServletPath(javax.servlet.http.HttpServletRequest request)
- Retrieves the current request servlet path.
Deals with differences between servlet specs (2.2 vs 2.3+)
- 参数:
request
- the request
- 返回:
- the servlet path
getUri
public static String getUri(javax.servlet.http.HttpServletRequest request)
- Gets the uri from the request
- 参数:
request
- The request
- 返回:
- The uri