public final class ControllerUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addAccessControlHeaders(javax.servlet.http.HttpServletResponse response)
Add the access control headers to the response, allowing origin '*', methods 'POST' and max age
'1000'
|
static void |
addCharacterEncoding(javax.servlet.http.HttpServletResponse response)
Add the 'UTF-8' character encoding to the response
|
static void |
addResponseHeaders(javax.servlet.http.HttpServletResponse response)
Bundling method for adding both
character encoding
and access control headers to the response with
one call |
static String |
getRequestFormat(javax.servlet.http.HttpServletRequest request)
Extracts the format type from a request URL, e.g.
|
public static String getRequestFormat(javax.servlet.http.HttpServletRequest request)
request - public static void addResponseHeaders(javax.servlet.http.HttpServletResponse response)
character encoding
and access control headers to the response with
one callresponse - The response to add the encoding and headers topublic static void addCharacterEncoding(javax.servlet.http.HttpServletResponse response)
response - The response to add the character encoding topublic static void addAccessControlHeaders(javax.servlet.http.HttpServletResponse response)
response - The response to add access control headers toCopyright © 2018 Europeana Foundation. All rights reserved.