Class ExternalContextWrapper
- All Implemented Interfaces:
FacesWrapper<ExternalContext>
Provides a simple implementation of
ExternalContext that can be subclassed by developers wishing to provide specialized behavior to an existing
ExternalContext instance. The default implementation of all methods is to call through to the wrapped
ExternalContext instance.
Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped() to
access the instance being wrapped.
- Since:
- 2.0
-
Field Summary
Fields inherited from class jakarta.faces.context.ExternalContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Use the other constructor taking the implementation being wrapped.ExternalContextWrapper(ExternalContext wrapped) If this external context has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidThe default behavior of this method is to callExternalContext.addResponseCookie(String, String, Map)on the wrappedExternalContextobject.voidaddResponseHeader(String name, String value) The default behavior of this method is to callExternalContext.addResponseHeader(String,String)on the wrappedExternalContextobject.voidThe default behavior of this method is to callExternalContext.dispatch(String)on the wrappedExternalContextobject.encodeActionURL(String url) The default behavior of this method is to callExternalContext.encodeActionURL(String)on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.encodeBookmarkableURL(String, java.util.Map)on the wrappedExternalContextobject.encodeNamespace(String name) The default behavior of this method is to callExternalContext.encodeNamespace(String)on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.encodePartialActionURL(String)on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.encodeRedirectURL(String, java.util.Map)on the wrappedExternalContextobject.encodeResourceURL(String url) The default behavior of this method is to callExternalContext.encodeResourceURL(String)on the wrappedExternalContextobject.encodeWebsocketURL(String url) The default behavior of this method is to callExternalContext.encodeWebsocketURL(String)on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getApplicationContextPath()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getApplicationMap()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getAuthType()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getClientWindow()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getContext()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getContextName()on the wrappedExternalContextobject.getFlash()The default behavior of this method is to callExternalContext.getFlash()on the wrappedExternalContextobject.getInitParameter(String name) The default behavior of this method is to callExternalContext.getInitParameter(String)on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getInitParameterMap()on the wrappedExternalContextobject.getMimeType(String file) The default behavior of this method is to callExternalContext.getMimeType(String)on the wrappedExternalContextobject.getRealPath(String path) The default behavior of this method is to callExternalContext.getRealPath(String)on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRemoteUser()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequest()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestCharacterEncoding()on the wrappedExternalContextobject.intThe default behavior of this method is to callExternalContext.getRequestContentLength()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestContentType()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestContextPath()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestCookieMap()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestHeaderMap()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestHeaderValuesMap()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestLocale()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestLocales()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestMap()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestParameterMap()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestParameterNames()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestParameterValuesMap()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestPathInfo()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestScheme()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestServerName()on the wrappedExternalContextobject.intThe default behavior of this method is to callExternalContext.getRequestServerPort()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getRequestServletPath()on the wrappedExternalContextobject.getResource(String path) The default behavior of this method is to callExternalContext.getResource(String)on the wrappedExternalContextobject.getResourceAsStream(String path) The default behavior of this method is to callExternalContext.getResourceAsStream(String)on the wrappedExternalContextobject.getResourcePaths(String path) The default behavior of this method is to callExternalContext.getResourcePaths(String)on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getResponse()on the wrappedExternalContextobject.intThe default behavior of this method is to callExternalContext.getResponseBufferSize()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getResponseCharacterEncoding()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getResponseContentType()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getResponseOutputStream()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getResponseOutputWriter()on the wrappedExternalContextobject.getSession(boolean create) The default behavior of this method is to callExternalContext.getSession(boolean)on the wrappedExternalContextobject.getSessionId(boolean create) The default behavior of this method is to callExternalContext.getSessionId(boolean)on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getSessionMap()on the wrappedExternalContextobject.intThe default behavior of this method is to callExternalContext.getSessionMaxInactiveInterval()on the wrappedExternalContextobject.The default behavior of this method is to callExternalContext.getUserPrincipal()on the wrappedExternalContextobject.A class that implements this interface uses this method to return an instance of the class being wrapped.voidThe default behavior of this method is to callExternalContext.invalidateSession()on the wrappedExternalContextobject.booleanThe default behavior of this method is to callExternalContext.isResponseCommitted()on the wrappedExternalContextobject.booleanisSecure()The default behavior of this method is to callExternalContext.isSecure()on the wrappedExternalContextobject.booleanisUserInRole(String role) The default behavior of this method is to callExternalContext.isUserInRole(String)on the wrappedExternalContextobject.voidThe default behavior of this method is to callExternalContext.log(String)on the wrappedExternalContextobject.voidThe default behavior of this method is to callExternalContext.log(String, Throwable)on the wrappedExternalContextobject.voidThe default behavior of this method is to callExternalContext.redirect(String)on the wrappedExternalContextobject.voidThe default behavior of this method is to callExternalContext.responseFlushBuffer()on the wrappedExternalContextobject.voidThe default behavior of this method is to callExternalContext.responseReset()on the wrappedExternalContextobject.voidresponseSendError(int statusCode, String message) The default behavior of this method is to callExternalContext.responseSendError(int,String)on the wrappedExternalContextobject.voidsetClientWindow(ClientWindow window) The default behavior of this method is to callExternalContext.setClientWindow(jakarta.faces.lifecycle.ClientWindow)on the wrappedExternalContextobject.voidsetRequest(Object request) The default behavior of this method is to callExternalContext.setRequest(Object)on the wrappedExternalContextobject.voidsetRequestCharacterEncoding(String encoding) The default behavior of this method is to callExternalContext.setRequestCharacterEncoding(String)on the wrappedExternalContextobject.voidsetResponse(Object response) The default behavior of this method is to callExternalContext.setResponse(Object)on the wrappedExternalContextobject.voidsetResponseBufferSize(int size) The default behavior of this method is to callExternalContext.setResponseBufferSize(int)on the wrappedExternalContextobject.voidsetResponseCharacterEncoding(String encoding) The default behavior of this method is to callExternalContext.getResponseCharacterEncoding()on the wrappedExternalContextobject.voidsetResponseContentLength(int length) The default behavior of this method is to callExternalContext.setResponseContentLength(int)on the wrappedExternalContextobject.voidsetResponseContentType(String contentType) The default behavior of this method is to callExternalContext.setResponseContentType(String)on the wrappedExternalContextobject.voidsetResponseHeader(String name, String value) The default behavior of this method is to callExternalContext.setResponseHeader(String,String)on the wrappedExternalContextobject.voidsetResponseStatus(int statusCode) The default behavior of this method is to callExternalContext.setResponseStatus(int)on the wrappedExternalContextobject.voidsetSessionMaxInactiveInterval(int interval) The default behavior of this method is to callExternalContext.setSessionMaxInactiveInterval(int)on the wrappedExternalContextobject.
-
Constructor Details
-
ExternalContextWrapper
Deprecated.Use the other constructor taking the implementation being wrapped. -
ExternalContextWrapper
If this external context has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The
getWrapped()will then return the implementation being wrapped.- Parameters:
wrapped- The implementation being wrapped.- Since:
- 2.3
-
-
Method Details
-
getWrapped
Description copied from interface:FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrappedin interfaceFacesWrapper<ExternalContext>- Returns:
- the wrapped instance.
-
dispatch
The default behavior of this method is to call
ExternalContext.dispatch(String)on the wrappedExternalContextobject.- Specified by:
dispatchin classExternalContext- Parameters:
path- Context relative path to the specified resource, which must start with a slash ("/") character- Throws:
IOException- if an input/output error occurs- See Also:
-
encodeActionURL
The default behavior of this method is to call
ExternalContext.encodeActionURL(String)on the wrappedExternalContextobject.- Specified by:
encodeActionURLin classExternalContext- Parameters:
url- The input URL to be encoded- Returns:
- the encoded URL.
- See Also:
-
encodeNamespace
The default behavior of this method is to call
ExternalContext.encodeNamespace(String)on the wrappedExternalContextobject.- Specified by:
encodeNamespacein classExternalContext- Parameters:
name- Name to be encoded- Returns:
- the unique name prefixed with namespace.
- See Also:
-
encodePartialActionURL
The default behavior of this method is to call
ExternalContext.encodePartialActionURL(String)on the wrappedExternalContextobject.- Overrides:
encodePartialActionURLin classExternalContext- Parameters:
url- The input URL to be encoded- Returns:
- the encoded URL.
- See Also:
-
encodeResourceURL
The default behavior of this method is to call
ExternalContext.encodeResourceURL(String)on the wrappedExternalContextobject.- Specified by:
encodeResourceURLin classExternalContext- Parameters:
url- The input URL to be encoded- Returns:
- the encoded resource URL.
- See Also:
-
encodeWebsocketURL
The default behavior of this method is to call
ExternalContext.encodeWebsocketURL(String)on the wrappedExternalContextobject.- Specified by:
encodeWebsocketURLin classExternalContext- Parameters:
url- The input URL to be encoded.- Returns:
- the encoded websocket URL.
- See Also:
-
getApplicationMap
The default behavior of this method is to call
ExternalContext.getApplicationMap()on the wrappedExternalContextobject.- Specified by:
getApplicationMapin classExternalContext- Returns:
- the map associated with the backed
ServletContext. - See Also:
-
getApplicationContextPath
The default behavior of this method is to call
ExternalContext.getApplicationContextPath()on the wrappedExternalContextobject.- Overrides:
getApplicationContextPathin classExternalContext- Returns:
- the context path of this application.
- See Also:
-
getAuthType
The default behavior of this method is to call
ExternalContext.getAuthType()on the wrappedExternalContextobject.- Specified by:
getAuthTypein classExternalContext- Returns:
- the authentication type.
- See Also:
-
getContext
The default behavior of this method is to call
ExternalContext.getContext()on the wrappedExternalContextobject.- Specified by:
getContextin classExternalContext- Returns:
- the object of the
ServletContext. - See Also:
-
getInitParameter
The default behavior of this method is to call
ExternalContext.getInitParameter(String)on the wrappedExternalContextobject.- Specified by:
getInitParameterin classExternalContext- Parameters:
name- Name of the requested initialization parameter- Returns:
- the value of the specified parameter.
- See Also:
-
getInitParameterMap
The default behavior of this method is to call
ExternalContext.getInitParameterMap()on the wrappedExternalContextobject.- Specified by:
getInitParameterMapin classExternalContext- Returns:
- the init parameter map for this application.
- See Also:
-
getRemoteUser
The default behavior of this method is to call
ExternalContext.getRemoteUser()on the wrappedExternalContextobject.- Specified by:
getRemoteUserin classExternalContext- Returns:
- the user name of the current request.
- See Also:
-
getRequest
The default behavior of this method is to call
ExternalContext.getRequest()on the wrappedExternalContextobject.- Specified by:
getRequestin classExternalContext- Returns:
- the instance of the current request.
- See Also:
-
getRequestContextPath
The default behavior of this method is to call
ExternalContext.getRequestContextPath()on the wrappedExternalContextobject.- Specified by:
getRequestContextPathin classExternalContext- Returns:
- the context path for this request.
- See Also:
-
getRequestCookieMap
The default behavior of this method is to call
ExternalContext.getRequestCookieMap()on the wrappedExternalContextobject.- Specified by:
getRequestCookieMapin classExternalContext- Returns:
- the cookie map in the current request.
- See Also:
-
getRequestHeaderMap
The default behavior of this method is to call
ExternalContext.getRequestHeaderMap()on the wrappedExternalContextobject.- Specified by:
getRequestHeaderMapin classExternalContext- Returns:
- the header map in the current request.
- See Also:
-
getRequestHeaderValuesMap
The default behavior of this method is to call
ExternalContext.getRequestHeaderValuesMap()on the wrappedExternalContextobject.- Specified by:
getRequestHeaderValuesMapin classExternalContext- Returns:
- the header values map in the current request.
- See Also:
-
getRequestLocale
The default behavior of this method is to call
ExternalContext.getRequestLocale()on the wrappedExternalContextobject.- Specified by:
getRequestLocalein classExternalContext- Returns:
- the
Localeof the current request. - See Also:
-
getRequestLocales
The default behavior of this method is to call
ExternalContext.getRequestLocales()on the wrappedExternalContextobject.- Specified by:
getRequestLocalesin classExternalContext- Returns:
- the
IteratorofLocales of the current request. - See Also:
-
getRequestMap
The default behavior of this method is to call
ExternalContext.getRequestMap()on the wrappedExternalContextobject.- Specified by:
getRequestMapin classExternalContext- Returns:
- the map including the attributes of the current request.
- See Also:
-
getRequestParameterMap
The default behavior of this method is to call
ExternalContext.getRequestParameterMap()on the wrappedExternalContextobject.- Specified by:
getRequestParameterMapin classExternalContext- Returns:
- the map for the current request parameters.
- See Also:
-
getRequestParameterNames
The default behavior of this method is to call
ExternalContext.getRequestParameterNames()on the wrappedExternalContextobject.- Specified by:
getRequestParameterNamesin classExternalContext- Returns:
- the
Iteratorfor the names of the current request parameters. - See Also:
-
getRequestParameterValuesMap
The default behavior of this method is to call
ExternalContext.getRequestParameterValuesMap()on the wrappedExternalContextobject.- Specified by:
getRequestParameterValuesMapin classExternalContext- Returns:
- the map for the parameter values of the current request.
- See Also:
-
getRequestPathInfo
The default behavior of this method is to call
ExternalContext.getRequestPathInfo()on the wrappedExternalContextobject.- Specified by:
getRequestPathInfoin classExternalContext- Returns:
- the path information of the current request.
- See Also:
-
getRequestServletPath
The default behavior of this method is to call
ExternalContext.getRequestServletPath()on the wrappedExternalContextobject.- Specified by:
getRequestServletPathin classExternalContext- Returns:
- the Jakarta Servlet path information of the current request.
- See Also:
-
getResource
The default behavior of this method is to call
ExternalContext.getResource(String)on the wrappedExternalContextobject.- Specified by:
getResourcein classExternalContext- Parameters:
path- The path to the requested resource, which must start with a slash ("/" character- Returns:
- the URL of the resource.
- Throws:
MalformedURLException- if the specified path is not in the correct form- See Also:
-
getResourceAsStream
The default behavior of this method is to call
ExternalContext.getResourceAsStream(String)on the wrappedExternalContextobject.- Specified by:
getResourceAsStreamin classExternalContext- Parameters:
path- The path to the requested resource, which must start with a slash ("/" character- Returns:
- the
InputStreamfor the application resource. - See Also:
-
getResourcePaths
The default behavior of this method is to call
ExternalContext.getResourcePaths(String)on the wrappedExternalContextobject.- Specified by:
getResourcePathsin classExternalContext- Parameters:
path- Partial path used to match resources, which must start with a slash ("/") character- Returns:
- the
Setof resource paths for the application resources. - See Also:
-
getResponse
The default behavior of this method is to call
ExternalContext.getResponse()on the wrappedExternalContextobject.- Specified by:
getResponsein classExternalContext- Returns:
- the instance of the current
jakarta.servlet.http.HttpServletResponse. - See Also:
-
getSession
The default behavior of this method is to call
ExternalContext.getSession(boolean)on the wrappedExternalContextobject.- Specified by:
getSessionin classExternalContext- Parameters:
create- Flag indicating whether or not a new session should be created if there is no session associated with the current request- Returns:
- the session object of the current request.
- See Also:
-
getSessionId
The default behavior of this method is to call
ExternalContext.getSessionId(boolean)on the wrappedExternalContextobject.- Overrides:
getSessionIdin classExternalContext- Parameters:
create- Flag indicating whether or not a new session should be created if there is no session associated with the current request- Returns:
- the session id for the current request.
- Since:
- 2.2
- See Also:
-
getSessionMap
The default behavior of this method is to call
ExternalContext.getSessionMap()on the wrappedExternalContextobject.- Specified by:
getSessionMapin classExternalContext- Returns:
- the session map for the current application.
- See Also:
-
getSessionMaxInactiveInterval
public int getSessionMaxInactiveInterval()The default behavior of this method is to call
ExternalContext.getSessionMaxInactiveInterval()on the wrappedExternalContextobject.- Overrides:
getSessionMaxInactiveIntervalin classExternalContext- Returns:
- the session maximum inactive interval.
- See Also:
-
setSessionMaxInactiveInterval
public void setSessionMaxInactiveInterval(int interval) The default behavior of this method is to call
ExternalContext.setSessionMaxInactiveInterval(int)on the wrappedExternalContextobject.- Overrides:
setSessionMaxInactiveIntervalin classExternalContext- Parameters:
interval- the value to be set.- See Also:
-
setClientWindow
The default behavior of this method is to call
ExternalContext.setClientWindow(jakarta.faces.lifecycle.ClientWindow)on the wrappedExternalContextobject.- Overrides:
setClientWindowin classExternalContext- Parameters:
window- the window associated with this request.- Since:
- 2.2
-
getUserPrincipal
The default behavior of this method is to call
ExternalContext.getUserPrincipal()on the wrappedExternalContextobject.- Specified by:
getUserPrincipalin classExternalContext- Returns:
- the
Principalobject. - See Also:
-
getClientWindow
The default behavior of this method is to call
ExternalContext.getClientWindow()on the wrappedExternalContextobject.- Overrides:
getClientWindowin classExternalContext- Returns:
- the instance of the
ClientWindow. - Since:
- 2.2
- See Also:
-
isUserInRole
The default behavior of this method is to call
ExternalContext.isUserInRole(String)on the wrappedExternalContextobject.- Specified by:
isUserInRolein classExternalContext- Parameters:
role- Logical role name to be checked- Returns:
- the flag indicating whether the current user is in the specified role.
- See Also:
-
log
The default behavior of this method is to call
ExternalContext.log(String)on the wrappedExternalContextobject.- Specified by:
login classExternalContext- Parameters:
message- Message to be logged- See Also:
-
log
The default behavior of this method is to call
ExternalContext.log(String, Throwable)on the wrappedExternalContextobject.- Specified by:
login classExternalContext- Parameters:
message- Message to be loggedexception- Exception to be logged- See Also:
-
redirect
The default behavior of this method is to call
ExternalContext.redirect(String)on the wrappedExternalContextobject.- Specified by:
redirectin classExternalContext- Parameters:
url- Absolute URL to which the client should be redirected- Throws:
IOException- if an input/output error occurs- See Also:
-
addResponseCookie
The default behavior of this method is to call
ExternalContext.addResponseCookie(String, String, Map)on the wrappedExternalContextobject.- Overrides:
addResponseCookiein classExternalContext- Parameters:
name- To be passed as the first argument to theCookieconstructor.value- To be passed as the second argument to theCookieconstructor.properties- AMapcontaing key/value pairs to be passed as arguments to the setter methods as described above.- See Also:
-
getMimeType
The default behavior of this method is to call
ExternalContext.getMimeType(String)on the wrappedExternalContextobject.- Overrides:
getMimeTypein classExternalContext- Parameters:
file- The file for which the mime type should be obtained.- Returns:
- the MIME type of the file.
- See Also:
-
getContextName
The default behavior of this method is to call
ExternalContext.getContextName()on the wrappedExternalContextobject.- Overrides:
getContextNamein classExternalContext- Returns:
- the name the
ServletContext. - See Also:
-
setRequest
The default behavior of this method is to call
ExternalContext.setRequest(Object)on the wrappedExternalContextobject.- Overrides:
setRequestin classExternalContext- Parameters:
request- the request object to be set.- See Also:
-
getRequestScheme
The default behavior of this method is to call
ExternalContext.getRequestScheme()on the wrappedExternalContextobject.- Overrides:
getRequestSchemein classExternalContext- Returns:
- the name of the scheme.
- See Also:
-
getRequestServerName
The default behavior of this method is to call
ExternalContext.getRequestServerName()on the wrappedExternalContextobject.- Overrides:
getRequestServerNamein classExternalContext- Returns:
- the host name of the server.
- See Also:
-
getRequestServerPort
public int getRequestServerPort()The default behavior of this method is to call
ExternalContext.getRequestServerPort()on the wrappedExternalContextobject.- Overrides:
getRequestServerPortin classExternalContext- Returns:
- the port number to which the request was sent.
- See Also:
-
setRequestCharacterEncoding
The default behavior of this method is to call
ExternalContext.setRequestCharacterEncoding(String)on the wrappedExternalContextobject.- Overrides:
setRequestCharacterEncodingin classExternalContext- Parameters:
encoding- the encoding name to be set.- Throws:
UnsupportedEncodingException- if this is not a valid encoding- See Also:
-
getRealPath
The default behavior of this method is to call
ExternalContext.getRealPath(String)on the wrappedExternalContextobject.- Overrides:
getRealPathin classExternalContext- Parameters:
path- The context of the requested initialization parameter- Returns:
- the real path for the specified virtual path.
- See Also:
-
getRequestCharacterEncoding
The default behavior of this method is to call
ExternalContext.getRequestCharacterEncoding()on the wrappedExternalContextobject.- Overrides:
getRequestCharacterEncodingin classExternalContext- Returns:
- the character encoding currently being used.
- See Also:
-
getRequestContentType
The default behavior of this method is to call
ExternalContext.getRequestContentType()on the wrappedExternalContextobject.- Overrides:
getRequestContentTypein classExternalContext- Returns:
- the Content-Type for this request.
- See Also:
-
getRequestContentLength
public int getRequestContentLength()The default behavior of this method is to call
ExternalContext.getRequestContentLength()on the wrappedExternalContextobject.- Overrides:
getRequestContentLengthin classExternalContext- Returns:
- the content length of the current request.
- See Also:
-
getResponseCharacterEncoding
The default behavior of this method is to call
ExternalContext.getResponseCharacterEncoding()on the wrappedExternalContextobject.- Overrides:
getResponseCharacterEncodingin classExternalContext- Returns:
- the name of the character encoding.
- See Also:
-
getResponseContentType
The default behavior of this method is to call
ExternalContext.getResponseContentType()on the wrappedExternalContextobject.- Overrides:
getResponseContentTypein classExternalContext- Returns:
- the MIME Content-Type for this response.
- See Also:
-
setResponse
The default behavior of this method is to call
ExternalContext.setResponse(Object)on the wrappedExternalContextobject.- Overrides:
setResponsein classExternalContext- Parameters:
response- the response instance to be set.- See Also:
-
getResponseOutputStream
The default behavior of this method is to call
ExternalContext.getResponseOutputStream()on the wrappedExternalContextobject.- Overrides:
getResponseOutputStreamin classExternalContext- Returns:
- the
OutputStreamfor the current response. - Throws:
IOException- any IO related exception.- See Also:
-
getResponseOutputWriter
The default behavior of this method is to call
ExternalContext.getResponseOutputWriter()on the wrappedExternalContextobject.- Overrides:
getResponseOutputWriterin classExternalContext- Returns:
- the
Writerfor the current response. - Throws:
IOException- any IO related exception.- See Also:
-
setResponseCharacterEncoding
The default behavior of this method is to call
ExternalContext.getResponseCharacterEncoding()on the wrappedExternalContextobject.- Overrides:
setResponseCharacterEncodingin classExternalContext- Parameters:
encoding- the character encoding to be sent by the current response.- See Also:
-
setResponseContentType
The default behavior of this method is to call
ExternalContext.setResponseContentType(String)on the wrappedExternalContextobject.- Overrides:
setResponseContentTypein classExternalContext- Parameters:
contentType- The content type to be set as the contentType of the response.- See Also:
-
invalidateSession
public void invalidateSession()The default behavior of this method is to call
ExternalContext.invalidateSession()on the wrappedExternalContextobject.- Overrides:
invalidateSessionin classExternalContext- See Also:
-
setResponseHeader
The default behavior of this method is to call
ExternalContext.setResponseHeader(String,String)on the wrappedExternalContextobject.- Overrides:
setResponseHeaderin classExternalContext- Parameters:
name- The name of the response header.value- The value of the response header.- See Also:
-
addResponseHeader
The default behavior of this method is to call
ExternalContext.addResponseHeader(String,String)on the wrappedExternalContextobject.- Overrides:
addResponseHeaderin classExternalContext- Parameters:
name- The name of the response header.value- The value of the response header.- See Also:
-
setResponseBufferSize
public void setResponseBufferSize(int size) The default behavior of this method is to call
ExternalContext.setResponseBufferSize(int)on the wrappedExternalContextobject.- Overrides:
setResponseBufferSizein classExternalContext- Parameters:
size- the new buffer size- See Also:
-
getResponseBufferSize
public int getResponseBufferSize()The default behavior of this method is to call
ExternalContext.getResponseBufferSize()on the wrappedExternalContextobject.- Overrides:
getResponseBufferSizein classExternalContext- Returns:
- the buffer size of the response.
- See Also:
-
isResponseCommitted
public boolean isResponseCommitted()The default behavior of this method is to call
ExternalContext.isResponseCommitted()on the wrappedExternalContextobject.- Overrides:
isResponseCommittedin classExternalContext- Returns:
- the flag indicating whether the current response has been committed.
- See Also:
-
isSecure
public boolean isSecure()The default behavior of this method is to call
ExternalContext.isSecure()on the wrappedExternalContextobject.- Overrides:
isSecurein classExternalContext- Returns:
- the boolean indicating whether this request is secured.
-
responseReset
public void responseReset()The default behavior of this method is to call
ExternalContext.responseReset()on the wrappedExternalContextobject.- Overrides:
responseResetin classExternalContext- See Also:
-
responseSendError
The default behavior of this method is to call
ExternalContext.responseSendError(int,String)on the wrappedExternalContextobject.- Overrides:
responseSendErrorin classExternalContext- Parameters:
statusCode- an HTTP status codemessage- an option message to detail the cause of the code- Throws:
IOException- any IO related exceptions.- See Also:
-
setResponseStatus
public void setResponseStatus(int statusCode) The default behavior of this method is to call
ExternalContext.setResponseStatus(int)on the wrappedExternalContextobject.- Overrides:
setResponseStatusin classExternalContext- Parameters:
statusCode- an HTTP status code- See Also:
-
responseFlushBuffer
The default behavior of this method is to call
ExternalContext.responseFlushBuffer()on the wrappedExternalContextobject.- Overrides:
responseFlushBufferin classExternalContext- Throws:
IOException- any IO related exception.- See Also:
-
setResponseContentLength
public void setResponseContentLength(int length) The default behavior of this method is to call
ExternalContext.setResponseContentLength(int)on the wrappedExternalContextobject.- Overrides:
setResponseContentLengthin classExternalContext- Parameters:
length- the value to be set.- See Also:
-
encodeBookmarkableURL
The default behavior of this method is to call
ExternalContext.encodeBookmarkableURL(String, java.util.Map)on the wrappedExternalContextobject.- Overrides:
encodeBookmarkableURLin classExternalContext- Parameters:
baseUrl- The base URL onto which the query string generated by this method will be appended. The URL may contain query parameters.parameters- The collection of Parameter objects, representing name=value pairs that are used to produce a query string- Returns:
- the result of encoding.
- See Also:
-
encodeRedirectURL
The default behavior of this method is to call
ExternalContext.encodeRedirectURL(String, java.util.Map)on the wrappedExternalContextobject.- Overrides:
encodeRedirectURLin classExternalContext- Parameters:
baseUrl- The base URL onto which the query string generated by this method will be appended. The URL may contain query parameters.parameters- The collection of Parameter objects, representing name=value pairs that are used to produce a query string- Returns:
- the result of encoding.
- See Also:
-
getFlash
The default behavior of this method is to call
ExternalContext.getFlash()on the wrappedExternalContextobject.- Overrides:
getFlashin classExternalContext- Returns:
- the
Flashfor this application. - See Also:
-