|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.net.HttpServletSupport
@Beta public final class HttpServletSupport
Utilities for working with HTTP Servlet requests and responses.
| Constructor Summary | |
|---|---|
private |
HttpServletSupport()
Constructor. |
| Method Summary | |
|---|---|
static void |
addNoCacheHeaders(HttpServletResponse response)
Adds Cache-Control and Pragma headers meant to disable caching. |
static URI |
getFullRequestUri(HttpServletRequest request)
Gets the URL that was requested to generate this request. |
static String |
getRequestPathWithoutContext(HttpServletRequest request)
Gets the request URI as returned by HttpServletRequest.getRequestURI() but without the servlet context
path. |
static void |
setContentType(HttpServletResponse response,
String contentType)
Sets the MIME content type of the response. |
static void |
setUTF8Encoding(HttpServletResponse response)
Sets the character encoding of the transport to UTF-8. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private HttpServletSupport()
| Method Detail |
|---|
public static void addNoCacheHeaders(HttpServletResponse response)
response - transport to add headers topublic static void setUTF8Encoding(HttpServletResponse response)
response - transport to set character encoding type
public static void setContentType(HttpServletResponse response,
String contentType)
response - the transport to set content type oncontentType - the content type to setpublic static String getRequestPathWithoutContext(HttpServletRequest request)
HttpServletRequest.getRequestURI() but without the servlet context
path.
request - request to get the URI from
public static URI getFullRequestUri(HttpServletRequest request)
request - current request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||