public class ProxyUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ProxyUtils.__ |
static class |
ProxyUtils.Page |
Modifier and Type | Field and Description |
---|---|
static String |
E_HTTP_HTTPS_ONLY |
static String |
LOCATION |
Constructor and Description |
---|
ProxyUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
notFound(javax.servlet.http.HttpServletResponse resp,
String message)
Output 404 with appropriate message.
|
static void |
rejectNonHttpRequests(javax.servlet.ServletRequest req)
Reject any request that isn't from an HTTP servlet
|
static void |
sendRedirect(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String target)
Handle redirects with a status code that can in future support verbs other
than GET, thus supporting full REST functionality.
|
public static final String E_HTTP_HTTPS_ONLY
public static final String LOCATION
public static void sendRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String target) throws IOException
The target URL is included in the redirect text returned
At the end of this method, the output stream is closed.
request
- request (hence: the verb and any other information
relevant to a redirect)response
- the responsetarget
- the target URL -unencodedIOException
public static void notFound(javax.servlet.http.HttpServletResponse resp, String message) throws IOException
resp
- the http response.message
- the message to include on the page.IOException
- on any error.public static void rejectNonHttpRequests(javax.servlet.ServletRequest req) throws javax.servlet.ServletException
req
- requestjavax.servlet.ServletException
- if the request is of the wrong typeCopyright © 2008–2022 Apache Software Foundation. All rights reserved.