Get Request and Session Parameters and Attributes from JSF pages

HttpServletRequest req = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
HttpServletResponse res = (HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();

Fuente: http://stackoverflow.com/questions/550448/get-request-and-session-parameters-and-attributes-from-jsf-pages

post-author