|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.web.util.UriComponentsBuilder
org.springframework.web.servlet.support.ServletUriComponentsBuilder
public class ServletUriComponentsBuilder
A UriComponentsBuilder that extracts information from an HttpServletRequest.
| Constructor Summary | |
|---|---|
protected |
ServletUriComponentsBuilder()
Default constructor. |
| Method Summary | |
|---|---|
static ServletUriComponentsBuilder |
fromContextPath(HttpServletRequest request)
Prepare a builder from the host, port, scheme, and context path of an HttpServletRequest. |
static ServletUriComponentsBuilder |
fromCurrentContextPath()
Same as fromContextPath(HttpServletRequest) except the
request is obtained through RequestContextHolder. |
static ServletUriComponentsBuilder |
fromCurrentRequest()
Same as fromRequest(HttpServletRequest) except the
request is obtained through RequestContextHolder. |
static ServletUriComponentsBuilder |
fromCurrentRequestUri()
Same as fromRequestUri(HttpServletRequest) except the
request is obtained through RequestContextHolder. |
static ServletUriComponentsBuilder |
fromCurrentServletMapping()
Same as fromServletMapping(HttpServletRequest) except the
request is obtained through RequestContextHolder. |
static ServletUriComponentsBuilder |
fromRequest(HttpServletRequest request)
Prepare a builder by copying the scheme, host, port, path, and query string of an HttpServletRequest. |
static ServletUriComponentsBuilder |
fromRequestUri(HttpServletRequest request)
Prepare a builder from the host, port, scheme, and path of an HttpSevletRequest. |
static ServletUriComponentsBuilder |
fromServletMapping(HttpServletRequest request)
Prepare a builder from the host, port, scheme, context path, and servlet mapping of an HttpServletRequest. |
| Methods inherited from class org.springframework.web.util.UriComponentsBuilder |
|---|
build, build, buildAndExpand, buildAndExpand, fragment, fromHttpUrl, fromPath, fromUri, fromUriString, host, newInstance, path, pathSegment, port, query, queryParam, replacePath, replaceQuery, replaceQueryParam, scheme, uri, userInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ServletUriComponentsBuilder()
fromContextPath(HttpServletRequest),
fromServletMapping(HttpServletRequest),
fromRequest(HttpServletRequest),
fromCurrentContextPath(),
fromCurrentServletMapping(),
fromCurrentRequest()| Method Detail |
|---|
public static ServletUriComponentsBuilder fromContextPath(HttpServletRequest request)
public static ServletUriComponentsBuilder fromServletMapping(HttpServletRequest request)
If the servlet is mapped by name, e.g. "/main/*", the path
will end with "/main". If the servlet is mapped otherwise, e.g.
"/" or "*.do", the result will be the same as
if calling fromContextPath(HttpServletRequest).
public static ServletUriComponentsBuilder fromRequestUri(HttpServletRequest request)
public static ServletUriComponentsBuilder fromRequest(HttpServletRequest request)
public static ServletUriComponentsBuilder fromCurrentContextPath()
fromContextPath(HttpServletRequest) except the
request is obtained through RequestContextHolder.
public static ServletUriComponentsBuilder fromCurrentServletMapping()
fromServletMapping(HttpServletRequest) except the
request is obtained through RequestContextHolder.
public static ServletUriComponentsBuilder fromCurrentRequestUri()
fromRequestUri(HttpServletRequest) except the
request is obtained through RequestContextHolder.
public static ServletUriComponentsBuilder fromCurrentRequest()
fromRequest(HttpServletRequest) except the
request is obtained through RequestContextHolder.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||