Package org.appng.core
Class Redirect
- java.lang.Object
-
- org.appng.core.Redirect
-
public class Redirect extends Object
Utility class for sending HTTP redirects to aHttpServletResponse
. See RFC 2616 for further details.- Author:
- Matthias Müller, Matthias Herlitzius
- See Also:
HttpServletResponse.SC_MOVED_PERMANENTLY
,HttpServletResponse.SC_FOUND
,HttpServletResponse.SC_SEE_OTHER
,HttpServletResponse.SC_TEMPORARY_REDIRECT
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
to(javax.servlet.http.HttpServletResponse response, Integer statusCode, String target)
Sends a redirect with the givenstatusCode
andtarget
to aHttpServletResponse
.static void
to(javax.servlet.http.HttpServletResponse response, Integer statusCode, String origin, String target)
Sends a redirect with the givenstatusCode
andtarget
to aHttpServletResponse
.
-
-
-
Method Detail
-
to
public static void to(javax.servlet.http.HttpServletResponse response, Integer statusCode, String target)
Sends a redirect with the givenstatusCode
andtarget
to aHttpServletResponse
.- Parameters:
response
- the responsestatusCode
- the HTTP status-codetarget
- the redirect target
-
to
public static void to(javax.servlet.http.HttpServletResponse response, Integer statusCode, String origin, String target)
Sends a redirect with the givenstatusCode
andtarget
to aHttpServletResponse
.- Parameters:
response
- the responsestatusCode
- the HTTP status-codeorigin
- the (optional) origin of the request, only used for loggingtarget
- the redirect target
-
-