org.apache.struts2

## Class RequestUtils

- java.lang.Object
- - org.apache.struts2.RequestUtils

-     public class RequestUtils
      extends Object

  Request handling utility class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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
    `static 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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RequestUtils

          public RequestUtils()

  - ### Method Detail

    - #### 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+)
      Parameters:
        `request` - the request
      Returns:
        the servlet path

    - #### getUri

          public static String getUri(javax.servlet.http.HttpServletRequest request)

      Gets the uri from the request
      Parameters:
        `request` - The request
      Returns:
        The uri

    - #### parseIfModifiedSince

          public static 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
      Parameters:
        `headerValue` - value of If-Modified-Since header
      Returns:
        proper date or null

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.