Class ServletWrapperResponse
java.lang.Object
org.ametys.core.servletwrapper.servlet.ServletWrapperResponse
- All Implemented Interfaces:
HttpServletResponse
,ServletResponse
This class is a filter for the communication between Tomcat and Cocoon. This one concerns the response request.
All the methods of the HttpServletResponse interface are implemented.
Only one of them will be usefull : sendRedirect(). This method uses the cocoon redirector to send the request.
Only one of them will be usefull : sendRedirect(). This method uses the cocoon redirector to send the request.
-
Field Summary
Fields inherited from interface javax.servlet.http.HttpServletResponse
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY
-
Constructor Summary
ConstructorDescriptionServletWrapperResponse
(HttpServletResponse req, Redirector redirect) Constructor of this filter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addDateHeader
(String name, long date) void
void
addIntHeader
(String name, int value) boolean
containsHeader
(String name) encodeRedirectUrl
(String url) Deprecated.encodeRedirectURL
(String url) Deprecated.void
int
getHeaders
(String name) int
boolean
void
reset()
void
void
sendError
(int sc) void
void
sendRedirect
(String location) void
setBufferSize
(int size) void
setCharacterEncoding
(String arg0) void
setContentLength
(int length) void
setContentLengthLong
(long len) void
setContentType
(String type) void
setDateHeader
(String name, long date) void
void
setIntHeader
(String name, int value) void
void
setStatus
(int sc) void
Deprecated.
-
Constructor Details
-
ServletWrapperResponse
Constructor of this filter.- Parameters:
req
- the response Httpservletredirect
- the Cocoon redirector.
-
-
Method Details
-
addHeader
- Specified by:
addHeader
in interfaceHttpServletResponse
-
addDateHeader
- Specified by:
addDateHeader
in interfaceHttpServletResponse
-
setIntHeader
- Specified by:
setIntHeader
in interfaceHttpServletResponse
-
setDateHeader
- Specified by:
setDateHeader
in interfaceHttpServletResponse
-
getHeader
- Specified by:
getHeader
in interfaceHttpServletResponse
-
getHeaders
- Specified by:
getHeaders
in interfaceHttpServletResponse
-
getHeaderNames
- Specified by:
getHeaderNames
in interfaceHttpServletResponse
-
setContentType
- Specified by:
setContentType
in interfaceServletResponse
-
encodeURL
- Specified by:
encodeURL
in interfaceHttpServletResponse
-
encodeUrl
Deprecated.- Specified by:
encodeUrl
in interfaceHttpServletResponse
-
encodeRedirectURL
- Specified by:
encodeRedirectURL
in interfaceHttpServletResponse
-
encodeRedirectUrl
Deprecated.- Specified by:
encodeRedirectUrl
in interfaceHttpServletResponse
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfaceServletResponse
-
setContentLength
- Specified by:
setContentLength
in interfaceServletResponse
-
setContentLengthLong
- Specified by:
setContentLengthLong
in interfaceServletResponse
-
isCommitted
- Specified by:
isCommitted
in interfaceServletResponse
-
getOutputStream
- Specified by:
getOutputStream
in interfaceServletResponse
- Throws:
IOException
-
setStatus
- Specified by:
setStatus
in interfaceHttpServletResponse
-
setStatus
Deprecated.- Specified by:
setStatus
in interfaceHttpServletResponse
-
getStatus
- Specified by:
getStatus
in interfaceHttpServletResponse
-
reset
- Specified by:
reset
in interfaceServletResponse
-
getBufferSize
- Specified by:
getBufferSize
in interfaceServletResponse
-
flushBuffer
- Specified by:
flushBuffer
in interfaceServletResponse
- Throws:
IOException
-
setBufferSize
- Specified by:
setBufferSize
in interfaceServletResponse
-
sendRedirect
- Specified by:
sendRedirect
in interfaceHttpServletResponse
- Throws:
IOException
-
setHeader
- Specified by:
setHeader
in interfaceHttpServletResponse
-
getLocale
- Specified by:
getLocale
in interfaceServletResponse
-
setLocale
- Specified by:
setLocale
in interfaceServletResponse
-
sendError
- Specified by:
sendError
in interfaceHttpServletResponse
- Throws:
IOException
-
sendError
- Specified by:
sendError
in interfaceHttpServletResponse
- Throws:
IOException
-
containsHeader
- Specified by:
containsHeader
in interfaceHttpServletResponse
-
addIntHeader
- Specified by:
addIntHeader
in interfaceHttpServletResponse
-
getWriter
- Specified by:
getWriter
in interfaceServletResponse
- Throws:
IOException
-
addCookie
- Specified by:
addCookie
in interfaceHttpServletResponse
-
getContentType
- Specified by:
getContentType
in interfaceServletResponse
-
resetBuffer
- Specified by:
resetBuffer
in interfaceServletResponse
-
setCharacterEncoding
- Specified by:
setCharacterEncoding
in interfaceServletResponse
-