The Java Server Faces (JSF 1.1) framework
uses a FacesContext object to store all the contextual information related to a single incoming request from a client , and all the information needed to create a response to send back to the client. Stored messages, beans, renderKits and responseWriters are all examples of this form of information, which can then be used by the JSF framework to manage an XPages UI component's state for the duration of the request processing life-cycle.
One of the more important pieces of information stored in the FacesContext is the ExternalContext which is a wrapper that provides access to the web container context and it is transparent to how the underlying server is implemented, i.e. servlet or a portlet. The ExternalContext can be used to access information about the request, such as the request header, cookies, locale, request parameters, session information, file and resource paths, and the application environment context. The application environment context can further be used to find information about the servlet or portlet running the application.
Each of the methods published in the APIs for FacesContext and ExternalContext
var externalContext = facesContext.getExternalContext();
var request = externalContext.getRequest(); this is a HttpServletRequest
var serverName = request.getServerName();
var cookie = request.getHeader("Cookie");
Examples of how to use the facesContext global object can also be found by opening the xpCGIVariables
In Domino Designer, select File
-> server name
In the navigator window, expand the following menu elements: Code
-> Script Libraries
and open the library xpCGIVariables.