This implementation of ExternalContext is specific to the servlet implementation.
| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private ClientWindow | |
| private Map | |
| private final boolean | |
| private static final Map | |
| private Flash | |
| private Map | |
| private static final Logger | |
| private ServletRequest | |
| private Map | |
| private Map | |
| private Map | |
| private Map | |
| private Map | |
| private ServletResponse | |
| private ServletContext | |
| private Map | |
| pack-priv static final Class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addResponseCookie(String
To be passed as the first argument to the name, String Cookie constructor.To be passed as the second argument to the value, Map<String, Object> Cookie constructor.A properties)Map containg key/value pairs to be passed as arguments to the setter methods as
described above.Overrides jakarta. Adds the cookie represented by the arguments to the response. |
| public void | addResponseHeader(String
The name of the response header. name, String The value of the response header. value)Overrides jakarta. 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 requestURI)Implements abstract jakarta. Dispatch a request to the specified resource to create output for this response. |
| private void | |
| public String | encodeActionURL(String
The input URL to be encoded url)Implements abstract jakarta. 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 | encodeBookmarkableURL(String
The base URL onto which the query string generated by this method will be appended. The URL may
contain query parameters. baseUrl, Map<String, List<String>> The collection of Parameter objects, representing name=value pairs that are used to produce a query
string parameters)Overrides jakarta. The purpose of this method is to generate a query string from the collection of Parameter objects provided by the parameters argument and append that query string to the baseUrl. |
| public String | encodeNamespace(String
Name to be encoded name)Implements abstract jakarta. 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. 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 | encodeRedirectURL(String
The base URL onto which the query string generated by this method will be appended. The URL may
contain query parameters. baseUrl, Map<String, List<String>> The collection of Parameter objects, representing name=value pairs that are used to produce a query
string parameters)Overrides jakarta. The purpose of this method is to generate a query string from the collection of Parameter objects provided by the parameters argument and append that query string to the baseUrl. |
| public String | encodeResourceURL(String
The input URL to be encoded url)Implements abstract jakarta. 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. 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. Return the name of the container context for this application. |
| public Map | getApplicationMap()
Implements abstract jakarta.
Return a mutable |
| public String | getAuthType()
Implements abstract jakarta.
Return the name of the authentication scheme used to authenticate the current user, if any; otherwise, return
|
| public ClientWindow | getClientWindow()
Overrides jakarta.
Return the |
| public Object | getContext()
Implements abstract jakarta. Return the application environment object instance for the current appication. |
| public String | getContextName()
Overrides jakarta. Return the name of the container context for this application. |
| private static String | |
| public Flash | getFlash()
Overrides jakarta.
Return the threadsafe |
| public String | getInitParameter(String
Name of the requested initialization parameter name)Implements abstract jakarta. Return the value of the specified application initialization parameter (if any). |
| public Map | getInitParameterMap()
Implements abstract jakarta.
Return an immutable |
| public String | getMimeType(String
The file for which the mime type should be obtained. file)Overrides jakarta.
Returns the MIME type of the specified file or |
| private PushBuilder | getPushBuilder(FacesContext context)
References Deprecated
PushBuilder is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public String | getRealPath(String
The context of the requested initialization parameter path)Overrides jakarta. Returns a String containing the real path for a given virtual path. |
| public String | getRemoteUser()
Implements abstract jakarta.
Return the login name of the user making the current request if any; otherwise, return |
| public Object | getRequest()
Implements abstract jakarta. Return the environment-specific object instance for the current request. |
| public String | getRequestCharacterEncoding()
Overrides jakarta. Return the character encoding currently being used to interpret this request. |
| public int | getRequestContentLength()
Overrides jakarta.
Return the result of calling |
| public String | getRequestContentType()
Overrides jakarta. Return the MIME Content-Type for this request. |
| public String | getRequestContextPath()
Implements abstract jakarta. Return the portion of the request URI that identifies the web application context for this request. |
| public Map | getRequestCookieMap()
Implements abstract jakarta.
Return an immutable |
| public Map | getRequestHeaderMap()
Implements abstract jakarta.
Return an immutable |
| public Map | getRequestHeaderValuesMap()
Implements abstract jakarta.
Return an immutable |
| public Locale | getRequestLocale()
Implements abstract jakarta.
Return the preferred |
| public Iterator | getRequestLocales()
Implements abstract jakarta.
Return an |
| public Map | getRequestMap()
Implements abstract jakarta.
Return a mutable |
| public Map | getRequestParameterMap()
Implements abstract jakarta.
Return an immutable |
| public Iterator | getRequestParameterNames()
Implements abstract jakarta.
Return an |
| public Map | getRequestParameterValuesMap()
Implements abstract jakarta.
Return an immutable |
| public String | getRequestPathInfo()
Implements abstract jakarta.
Return the extra path information (if any) included in the request URI; otherwise, return |
| public String | getRequestScheme()
Overrides jakarta. Returns the name of the scheme used to make this request, for example, http, https, or ftp. |
| public String | getRequestServerName()
Overrides jakarta. Returns the host name of the server to which the request was sent. |
| public int | getRequestServerPort()
Overrides jakarta. Returns the port number to which the request was sent. |
| public String | getRequestServletPath()
Implements abstract jakarta.
Return the Jakarta Servlet path information (if any) included in the request URI; otherwise, return
|
| public URL | getResource(String
The path to the requested resource, which must start with a slash ("/" character path)Implements abstract jakarta.
Return a |
| public InputStream | getResourceAsStream(String
The path to the requested resource, which must start with a slash ("/" character path)Implements abstract jakarta.
Return an |
| public Set | getResourcePaths(String
Partial path used to match resources, which must start with a slash ("/") character path)Implements abstract jakarta.
Return the |
| public Object | getResponse()
Implements abstract jakarta. Return the environment-specific object instance for the current response. |
| public int | getResponseBufferSize()
Overrides jakarta. Return the buffer size for the current response. |
| public String | getResponseCharacterEncoding()
Overrides jakarta. Returns the name of the character encoding (MIME charset) used for the body sent in this response. |
| public String | getResponseContentType()
Overrides jakarta. Return the MIME Content-Type for this response. |
| public OutputStream | getResponseOutputStream()
Overrides jakarta.
Returns an |
| public Writer | getResponseOutputWriter()
Overrides jakarta.
Returns a |
| 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.
If the |
| public String | getSessionId(boolean
Flag indicating whether or not a new session should be created if there is no session associated with
the current request create)Overrides jakarta.
Return the id of the current session or the empty string if no session has been created and the |
| public Map | getSessionMap()
Implements abstract jakarta.
Return a mutable |
| public int | getSessionMaxInactiveInterval()
Overrides jakarta. Returns the maximum time interval, in seconds, that the Jakarta Servlet container will keep this session open between client accesses. |
| public Principal | getUserPrincipal()
Implements abstract jakarta.
Return the |
| public void | invalidateSession()
Overrides jakarta. Invalidates this session then unbinds any objects bound to it. |
| public boolean | isResponseCommitted()
Overrides jakarta. Check if the current response has been committed. |
| public boolean | Returns: booleanOverrides jakarta. Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
| public boolean | isUserInRole(String
Logical role name to be checked role)Implements abstract jakarta.
Return |
| public void | log(String
Message to be logged message)Implements abstract jakarta. Log the specified message to the application object. |
| public void | log(String
Message to be logged message, Throwable Exception to be logged throwable)Implements abstract jakarta. Log the specified message and exception to the application object. |
| private void | |
| public void | redirect(String
Absolute URL to which the client should be redirected requestURI)Implements abstract jakarta.
Redirect a request to the specified URL, and cause the
|
| public void | release()
Implements abstract jakarta.
Release any resources associated with this |
| public void | responseFlushBuffer()
Overrides jakarta. Flushes the buffered response content to the client. |
| public void | responseReset()
Overrides jakarta. Resets the current response. |
| public void | responseSendError(int
an HTTP status code statusCode, String an option message to detail the cause of the code message)Overrides jakarta. Sends an HTTP status code with message. |
| public void | setClientWindow(ClientWindow
the window with which this instance is associated. window)Overrides jakarta.
Associate this instance with a |
| public void | setRequest(Object
the request object to be set. request)Overrides jakarta.
Set the environment-specific request to be returned by subsequent calls to |
| public void | setRequestCharacterEncoding(String
the encoding name to be set. encoding)Overrides jakarta. 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.
Set the environment-specific response to be returned by subsequent calls to |
| public void | setResponseBufferSize(int
the new buffer size size)Overrides jakarta. Set the buffer size for the current response. |
| public void | setResponseCharacterEncoding(String
the character encoding to be sent by the current response. encoding)Overrides jakarta. Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8. |
| public void | setResponseContentLength(int
the value to be set. length)Overrides jakarta. Set the content length of the response as an int
Jakarta Servlet: This must be performed by calling the |
| public void | setResponseContentLengthLong(long
the value to be set. length)Overrides jakarta. Set the content length of the response as a long. |
| public void | setResponseContentType(String
The content type to be set as the contentType of the response. contentType)Overrides jakarta. Sets the content type of the response being sent to the client, if the response has not been committed yet. |
| public void | setResponseHeader(String
The name of the response header. name, String The value of the response header. value)Overrides jakarta. Set the response header with the given name and value. |
| public void | setResponseStatus(int
an HTTP status code statusCode)Overrides jakarta. Sets the HTTP status code for the response. |
| public void | setSessionMaxInactiveInterval(int
the value to be set. interval)Overrides jakarta. Specifies the time, in seconds, between client requests before the Jakarta Servlet container will invalidate this session. |