Package org.apache.struts2
Class RequestUtils
java.lang.Object
org.apache.struts2.RequestUtils
Request handling utility class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getServletPath
(jakarta.servlet.http.HttpServletRequest request) Retrieves the current request servlet path.static String
getUri
(jakarta.servlet.http.HttpServletRequest request) Gets the uri from the requeststatic Date
parseIfModifiedSince
(String headerValue) Parse input string as date in formats defined for If-Modified-Since header, see: https://issues.apache.org/jira/browse/WW-4263 https://web.archive.org/web/20081014021349/http://rfc.net/rfc2616.html#p20
-
Constructor Details
-
RequestUtils
public RequestUtils()
-
-
Method Details
-
getServletPath
Retrieves the current request servlet path. Deals with differences between servlet specs (2.2 vs 2.3+)- Parameters:
request
- the request- Returns:
- the servlet path
-
getUri
Gets the uri from the request- Parameters:
request
- The request- Returns:
- The uri
-
parseIfModifiedSince
Parse input string as date in formats defined for If-Modified-Since header, see: https://issues.apache.org/jira/browse/WW-4263 https://web.archive.org/web/20081014021349/http://rfc.net/rfc2616.html#p20- Parameters:
headerValue
- value of If-Modified-Since header- Returns:
- proper date or null
-