RequestPath
representation of the path when use of
parsed patterns
is enabled or a String path for use with a
org.springframework.util.PathMatcher otherwise.
| Modifier and Type | Class and Description |
|---|---|
| private static class | ServletRequestPathUtils.
Simple wrapper around the default |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | PATH_ATTRIBUTE
Name of Servlet request attribute that holds the parsed |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | clearParsedRequestPath(ServletRequest request)
Remove the request attribute |
| public static Object | Returns: a String lookupPath or aRequestPaththe current request request)Return either a |
| public static String | Returns: the full request mapping path as a Stringthe current request request)Variant of |
| public static RequestPath | |
| public static boolean | Returns: whether a pre-resolved or pre-parsed path is availablethe current request request)Check for a previously |
| public static boolean | |
| public static RequestPath | parseAndCache(HttpServletRequest request)
Parse the |
| public static void | setParsedRequestPath(RequestPath
the value to set to, or if requestPath, ServletRequest null the cache
value is cleared.the current request request)Set the cached, parsed |
| PATH_ATTRIBUTE | back to summary |
|---|---|
| public static final String PATH_ATTRIBUTE Name of Servlet request attribute that holds the parsed | |
| ServletRequestPathUtils | back to summary |
|---|---|
| public ServletRequestPathUtils() | |
| clearParsedRequestPath | back to summary |
|---|---|
| public static void clearParsedRequestPath(ServletRequest request) Remove the request attribute | |
| getCachedPath | back to summary |
|---|---|
| public static Object getCachedPath(ServletRequest request) Return either a In Spring MVC, when at least one
| |
| getCachedPathValue | back to summary |
|---|---|
| public static String getCachedPathValue(ServletRequest request) Variant of If the cached path is a If the cached path is a
| |
| getParsedRequestPath | back to summary |
|---|---|
| public static RequestPath getParsedRequestPath(ServletRequest request) Return a
| |
| hasCachedPath | back to summary |
|---|---|
| public static boolean hasCachedPath(ServletRequest request) Check for a previously
| |
| hasParsedRequestPath | back to summary |
|---|---|
| public static boolean hasParsedRequestPath(ServletRequest request) Check for a | |
| parseAndCache | back to summary |
|---|---|
| public static RequestPath parseAndCache(HttpServletRequest request) Parse the The returned This method is typically called by the | |
| setParsedRequestPath | back to summary |
|---|---|
| public static void setParsedRequestPath(RequestPath requestPath, ServletRequest request) Set the cached, parsed
| |
RequestPath implementation that
supports a servletPath as an additional prefix to be omitted from
pathWithinApplication().
| Modifier and Type | Field and Description |
|---|---|
| private final PathContainer | |
| private final RequestPath |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public PathContainer | contextPath()
Implements org. Returns the portion of the URL path that represents the application. |
| public List | elements()
Implements org. The contained path elements, either |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| private static String | |
| public int | |
| public RequestPath | modifyContextPath(String
the new context path contextPath)Implements org. Return a new |
| public static RequestPath | |
| public PathContainer | pathWithinApplication()
Implements org. The portion of the request path after the context path which is typically used for request mapping within the application. |
| public String | |
| public String | value()
Implements org. The original path from which this instance was parsed. |
| contextPath | back to summary |
|---|---|
| private final PathContainer contextPath | |
| requestPath | back to summary |
|---|---|
| private final RequestPath requestPath | |
| ServletRequestPath | back to summary |
|---|---|
| private ServletRequestPath(String rawPath, String contextPath, String servletPathPrefix) | |
| contextPath | back to summary |
|---|---|
| public PathContainer contextPath() Implements org. Doc from org. Returns the portion of the URL path that represents the application. The context path is always at the beginning of the path and starts but does not end with "/". It is shared for URLs of the same application. The context path may come from the underlying runtime API such as
when deploying as a WAR to a Servlet container or it may be assigned in
a WebFlux application through the use of
| |
| elements | back to summary |
|---|---|
| public List Implements org. Doc from org. The contained path elements, either
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getServletPathPrefix | back to summary |
|---|---|
private static String getServletPathPrefix(HttpServletRequest request)
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| modifyContextPath | back to summary |
|---|---|
| public RequestPath modifyContextPath(String contextPath) Implements org. Doc from org. Return a new
| |
| parse | back to summary |
|---|---|
| public static RequestPath parse(HttpServletRequest request) | |
| pathWithinApplication | back to summary |
|---|---|
| public PathContainer pathWithinApplication() Implements org. Doc from org. The portion of the request path after the context path which is typically used for request mapping within the application.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| value | back to summary |
|---|---|
| public String value() Implements org. Doc from org. The original path from which this instance was parsed.
| |