public class Redirect extends Object
HttpServletResponse
.
See RFC 2616 for further details.HttpServletResponse.SC_MOVED_PERMANENTLY
,
HttpServletResponse.SC_FOUND
,
HttpServletResponse.SC_SEE_OTHER
,
HttpServletResponse.SC_TEMPORARY_REDIRECT
Modifier and Type | Method and Description |
---|---|
static void |
to(javax.servlet.http.HttpServletResponse response,
Integer statusCode,
String target)
Sends a redirect with the given
statusCode and target to a HttpServletResponse . |
static void |
to(javax.servlet.http.HttpServletResponse response,
Integer statusCode,
String origin,
String target)
Sends a redirect with the given
statusCode and target to a HttpServletResponse . |
public static void to(javax.servlet.http.HttpServletResponse response, Integer statusCode, String target)
statusCode
and target
to a HttpServletResponse
.response
- the responsestatusCode
- the HTTP status-codetarget
- the redirect targetpublic static void to(javax.servlet.http.HttpServletResponse response, Integer statusCode, String origin, String target)
statusCode
and target
to a HttpServletResponse
.response
- the responsestatusCode
- the HTTP status-codeorigin
- the (optional) origin of the request, only used for loggingtarget
- the redirect targetCopyright © 2011–2019 aiticon GmbH. All rights reserved.