Monday, December 3, 2012

JSF in Xpages

We can handle the servlet objects in xpages very effectively.

In xpages, JSF's facesContext is having the capablity to do this action. Actually this is fetching the CGI variables from server.

Long back I had one assignment, that time I used php for getting the CGI variables from server. I was not aware of this facesConetext at that time. But now I came to know that Xpages have that capablity. Please follow the commands. It should useful for you.

facesContext.getExternalContext().getRequest().getAuthType();


facesContext.getExternalContext().getRequest().getContentLength();

facesContext.getExternalContext().getRequest().getContentType();

facesContext.getExternalContext().getRequest().getContextPath();

facesContext.getExternalContext().getRequest().isSecure() ? "ON" : "OFF";

facesContext.getExternalContext().getRequest().getPathInfo();

facesContext.getExternalContext().getRequest().getPathTranslated();

facesContext.getExternalContext().getRequest().getQueryString();

facesContext.getExternalContext().getRequest().getRemoteAddr();

facesContext.getExternalContext().getRequest().getRemoteHost();

facesContext.getExternalContext().getRequest().getRemoteUser();

facesContext.getExternalContext().getRequest().getMethod();

facesContext.getExternalContext().getRequest().getScheme();

facesContext.getExternalContext().getRequest().getRequestURI();

facesContext.getExternalContext().getRequest().getServletPath();

facesContext.getExternalContext().getRequest().getServerName();

facesContext.getExternalContext().getRequest().getServerPort();

facesContext.getExternalContext().getRequest().getProtocol();

facesContext.getExternalContext().getContext().getServerInfo();

facesContext.getExternalContext().getHeader("Cooike")
facesContext.getExternalContext().getHeader("Host")
facesContext.getExternalContext().getHeader("Referer")

We can find this in our discussion8.ntf.