Top Fields Constructors Methods
com.sun.faces.config.initfacescontext

public Class ServletContextAdapter

extends ExternalContext
Class Inheritance
Static Imports
com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.EnableTransitionTimeNoOpFlash, java.lang.Boolean.parseBoolean, java.util.Collections.emptyIterator, .Collections.emptyMap

Field Summary

Modifier and TypeField and Description
private ApplicationMap
private InitParameterMap
private boolean
private ServletContext
Inherited from jakarta.faces.context.ExternalContext:
BASIC_AUTHCLIENT_CERT_AUTHDIGEST_AUTHFORM_AUTH

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addResponseHeader(String
The name of the response header.
name
,
String
The value of the response header.
value
)

Overrides jakarta.faces.context.ExternalContext.addResponseHeader.

Add the given name and value to the response header.

public void
dispatch(String
Context relative path to the specified resource, which must start with a slash ("/") character
path
)

Implements abstract jakarta.faces.context.ExternalContext.dispatch.

Dispatch a request to the specified resource to create output for this response.

public String
encodeActionURL(String
The input URL to be encoded
url
)

Implements abstract jakarta.faces.context.ExternalContext.encodeActionURL.

Return the input URL, after performing any rewriting needed to ensure that it will correctly identify an addressable action in the current application.

public String
encodeNamespace(String
Name to be encoded
name
)

Implements abstract jakarta.faces.context.ExternalContext.encodeNamespace.

Return the specified name, after prefixing it with a namespace that ensures that it will be unique within the context of a particular page.

public String
encodePartialActionURL(String
The input URL to be encoded
url
)

Overrides jakarta.faces.context.ExternalContext.encodePartialActionURL.

Return the input URL, after performing any rewriting needed to ensure that it can be used in a partial page submission (ajax request) to correctly identify an addressable action in the current application.

public String
encodeResourceURL(String
The input URL to be encoded
url
)

Implements abstract jakarta.faces.context.ExternalContext.encodeResourceURL.

Return the input URL, after performing any rewriting needed to ensure that it will correctly identify an addressable resource in the current application.

public String
encodeWebsocketURL(String
The input URL to be encoded.
url
)

Implements abstract jakarta.faces.context.ExternalContext.encodeWebsocketURL.

Return the websocket URL, after performing any rewriting needed to ensure that it will correctly identify an addressable websocket in the current application.

public String
getApplicationContextPath()

Overrides jakarta.faces.context.ExternalContext.getApplicationContextPath.

Return the name of the container context for this application.

public Map<String, Object>
getApplicationMap()

Implements abstract jakarta.faces.context.ExternalContext.getApplicationMap.

Return a mutable Map representing the application scope attributes for the current application.

public String
getAuthType()

Implements abstract jakarta.faces.context.ExternalContext.getAuthType.

Return the name of the authentication scheme used to authenticate the current user, if any; otherwise, return null.

public Object
getContext()

Implements abstract jakarta.faces.context.ExternalContext.getContext.

Return the application environment object instance for the current appication.

public String
getContextName()

Overrides jakarta.faces.context.ExternalContext.getContextName.

Return the name of the container context for this application.

public Flash
getFlash()

Overrides jakarta.faces.context.ExternalContext.getFlash.

Return the threadsafe Flash for this application.

public String
getInitParameter(String
Name of the requested initialization parameter
name
)

Implements abstract jakarta.faces.context.ExternalContext.getInitParameter.

Return the value of the specified application initialization parameter (if any).

public Map<String, String>
getInitParameterMap()

Implements abstract jakarta.faces.context.ExternalContext.getInitParameterMap.

Return an immutable Map whose keys are the set of application initialization parameter names configured for this application, and whose values are the corresponding parameter values.

public String
getMimeType(String
The file for which the mime type should be obtained.
file
)

Overrides jakarta.faces.context.ExternalContext.getMimeType.

Returns the MIME type of the specified file or null if the MIME type is not known.

public String
getRealPath(String
The context of the requested initialization parameter
path
)

Overrides jakarta.faces.context.ExternalContext.getRealPath.

Returns a String containing the real path for a given virtual path.

public String
getRemoteUser()

Implements abstract jakarta.faces.context.ExternalContext.getRemoteUser.

Return the login name of the user making the current request if any; otherwise, return null.

public Object
getRequest()

Implements abstract jakarta.faces.context.ExternalContext.getRequest.

Return the environment-specific object instance for the current request.

public String
getRequestCharacterEncoding()

Overrides jakarta.faces.context.ExternalContext.getRequestCharacterEncoding.

Return the character encoding currently being used to interpret this request.

public int
getRequestContentLength()

Overrides jakarta.faces.context.ExternalContext.getRequestContentLength.

Return the result of calling getContentLenth() on the ServletRequest instance for this request.

public String
getRequestContentType()

Overrides jakarta.faces.context.ExternalContext.getRequestContentType.

Return the MIME Content-Type for this request.

public String
getRequestContextPath()

Implements abstract jakarta.faces.context.ExternalContext.getRequestContextPath.

Return the portion of the request URI that identifies the web application context for this request.

public Map<String, Object>
getRequestCookieMap()

Implements abstract jakarta.faces.context.ExternalContext.getRequestCookieMap.

Return an immutable Map whose keys are the set of cookie names included in the current request, and whose values (of type jakarta.servlet.http.Cookie) are the first (or only) cookie for each cookie name returned by the underlying request.

public Map<String, String>
getRequestHeaderMap()

Implements abstract jakarta.faces.context.ExternalContext.getRequestHeaderMap.

Return an immutable Map whose keys are the set of request header names included in the current request, and whose values (of type String) are the first (or only) value for each header name returned by the underlying request.

public Map<String, String[]>
getRequestHeaderValuesMap()

Implements abstract jakarta.faces.context.ExternalContext.getRequestHeaderValuesMap.

Return an immutable Map whose keys are the set of request header names included in the current request, and whose values (of type String[]) are all of the value for each header name returned by the underlying request.

public Locale
getRequestLocale()

Implements abstract jakarta.faces.context.ExternalContext.getRequestLocale.

Return the preferred Locale in which the client will accept content.

public Iterator<Locale>
getRequestLocales()

Implements abstract jakarta.faces.context.ExternalContext.getRequestLocales.

Return an Iterator over the preferred Locales specified in the request, in decreasing order of preference.

public Map<String, Object>
getRequestMap()

Implements abstract jakarta.faces.context.ExternalContext.getRequestMap.

Return a mutable Map representing the request scope attributes for the current application.

public Map<String, String>
getRequestParameterMap()

Implements abstract jakarta.faces.context.ExternalContext.getRequestParameterMap.

Return an immutable Map whose keys are the set of request parameters names included in the current request, and whose values (of type String) are the first (or only) value for each parameter name returned by the underlying request.

public Iterator<String>
getRequestParameterNames()

Implements abstract jakarta.faces.context.ExternalContext.getRequestParameterNames.

Return an Iterator over the names of all request parameters included in the current request.

public Map<String, String[]>
getRequestParameterValuesMap()

Implements abstract jakarta.faces.context.ExternalContext.getRequestParameterValuesMap.

Return an immutable Map whose keys are the set of request parameters names included in the current request, and whose values (of type String[]) are all of the values for each parameter name returned by the underlying request.

public String
getRequestPathInfo()

Implements abstract jakarta.faces.context.ExternalContext.getRequestPathInfo.

Return the extra path information (if any) included in the request URI; otherwise, return null.

public String
getRequestServletPath()

Implements abstract jakarta.faces.context.ExternalContext.getRequestServletPath.

Return the Jakarta Servlet path information (if any) included in the request URI; otherwise, return null.

public URL
getResource(String
The path to the requested resource, which must start with a slash ("/" character
path
)

Implements abstract jakarta.faces.context.ExternalContext.getResource.

Return a URL for the application resource mapped to the specified path, if it exists; otherwise, return null.

public InputStream
getResourceAsStream(String
The path to the requested resource, which must start with a slash ("/" character
path
)

Implements abstract jakarta.faces.context.ExternalContext.getResourceAsStream.

Return an InputStream for an application resource mapped to the specified path, if it exists; otherwise, return null.

public Set<String>
getResourcePaths(String
Partial path used to match resources, which must start with a slash ("/") character
path
)

Implements abstract jakarta.faces.context.ExternalContext.getResourcePaths.

Return the Set of resource paths for all application resources whose resource path starts with the specified argument.

public Object
getResponse()

Implements abstract jakarta.faces.context.ExternalContext.getResponse.

Return the environment-specific object instance for the current response.

public String
getResponseCharacterEncoding()

Overrides jakarta.faces.context.ExternalContext.getResponseCharacterEncoding.

Returns the name of the character encoding (MIME charset) used for the body sent in this response.

public String
getResponseContentType()

Overrides jakarta.faces.context.ExternalContext.getResponseContentType.

Return the MIME Content-Type for this response.

public Object
getSession(boolean
Flag indicating whether or not a new session should be created if there is no session associated with the current request
create
)

Implements abstract jakarta.faces.context.ExternalContext.getSession.

If the create parameter is true, create (if necessary) and return a session instance associated with the current request.

public Map<String, Object>
getSessionMap()

Implements abstract jakarta.faces.context.ExternalContext.getSessionMap.

Return a mutable Map representing the session scope attributes for the current application.

public Principal
getUserPrincipal()

Implements abstract jakarta.faces.context.ExternalContext.getUserPrincipal.

Return the Principal object containing the name of the current authenticated user, if any; otherwise, return null.

public boolean
isUserInRole(String
Logical role name to be checked
role
)

Implements abstract jakarta.faces.context.ExternalContext.isUserInRole.

Return true if the currently authenticated user is included in the specified role.

public void
log(String
Message to be logged
message
)

Implements abstract jakarta.faces.context.ExternalContext.log.

Log the specified message to the application object.

public void
log(String
Message to be logged
message
,
Throwable
Exception to be logged
exception
)

Implements abstract jakarta.faces.context.ExternalContext.log.

Log the specified message and exception to the application object.

public void
redirect(String
Absolute URL to which the client should be redirected
url
)

Implements abstract jakarta.faces.context.ExternalContext.redirect.

Redirect a request to the specified URL, and cause the responseComplete() method to be called on the FacesContext instance for the current request.

public void
release()

Implements abstract jakarta.faces.context.ExternalContext.release.

Release any resources associated with this ExternalContext instance.

public void
setRequest(Object
the request object to be set.
request
)

Overrides jakarta.faces.context.ExternalContext.setRequest.

Set the environment-specific request to be returned by subsequent calls to getRequest.

public void
setRequestCharacterEncoding(String
the encoding name to be set.
requestCharacterEncoding
)

Overrides jakarta.faces.context.ExternalContext.setRequestCharacterEncoding.

Overrides the name of the character encoding used in the body of this request.

public void
setResponse(Object
the response instance to be set.
response
)

Overrides jakarta.faces.context.ExternalContext.setResponse.

Set the environment-specific response to be returned by subsequent calls to getResponse.

public void
setResponseCharacterEncoding(String
the character encoding to be sent by the current response.
responseCharacterEncoding
)

Overrides jakarta.faces.context.ExternalContext.setResponseCharacterEncoding.

Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8.

public void
setResponseHeader(String
The name of the response header.
name
,
String
The value of the response header.
value
)

Overrides jakarta.faces.context.ExternalContext.setResponseHeader.

Set the response header with the given name and value.

Inherited from jakarta.faces.context.ExternalContext:
addResponseCookieencodeBookmarkableURLencodeRedirectURLgetClientWindowgetRequestSchemegetRequestServerNamegetRequestServerPortgetResponseBufferSizegetResponseOutputStreamgetResponseOutputWritergetSessionIdgetSessionMaxInactiveIntervalinvalidateSessionisResponseCommittedisSecureresponseFlushBufferresponseResetresponseSendErrorsetClientWindowsetResponseBufferSizesetResponseContentLengthsetResponseContentLengthLongsetResponseContentTypesetResponseStatussetSessionMaxInactiveInterval