Constructor and Description |
---|
Redirect()
Shortcut for redirecting to the servlet root.
|
Redirect(int httpResponseCode,
Object url,
Object... args)
Redirect to the specified URL.
|
Redirect(Object uri)
|
Redirect(Object uri,
Object... args)
Redirect to the specified URL.
|
Modifier and Type | Method and Description |
---|---|
int |
getHttpResponseCode()
Returns the response code passed in through the constructor.
|
URI |
getURI()
Returns the URI to redirect to.
|
public Redirect(Object uri, Object... args)
Relative paths are interpreted as relative to the servlet path.
uri
- The URL to redirect to.
URL
URI
CharSequence
args
- Optional MessageFormat
-style arguments.public Redirect(Object uri)
URL
and URI
.
Same as calling toString()
on the object and using the other constructor.
uri
- The URL to redirect to.
URL
URI
CharSequence
public Redirect(int httpResponseCode, Object url, Object... args)
Relative paths are interpreted as relative to the servlet path.
httpResponseCode
- The HTTP response code.url
- The URL to redirect to.
URL
URI
CharSequence
args
- Optional MessageFormat
-style arguments.public Redirect()
public int getHttpResponseCode()
0
if response code wasn't specified.Copyright © 2018 Apache. All rights reserved.