ServletResponse response,
FilterChain chain) throws IOException, ServletException
{
// -= Scott O'Bryan =-
// Added for backward compatibility
ExternalContext ec = new ServletExternalContext(_servletContext, request, response);
boolean isHttpReq = ExternalContextUtils.isHttpServletRequest(ec);
if(isHttpReq)
{
response = _getResponse(ec);
ec.setResponse(response);
}
// Set up a PseudoFacesContext with the actual request and response
// so that RequestContext can be more functional in the interval
// between now and when the FacesServlet starts.
PseudoFacesContext pfc = new PseudoFacesContext(ec);
_PSEUDO_FACES_CONTEXT.set(pfc);
try
{
if(isHttpReq)
{
// If there are existing "launchParameters", then that means
// we've returned from a "launch", and we need to re-execute the
// faces lifecycle. ViewHandlerImpl will be responsible for ensuring
// that we re-execute the lifecycle on the correct page.
// -= Simon Lessard =-
// FIXME: Using <String, String[]> for now to accomodate ReplaceParametersRequestWrapper.
// However, the Servlet specification suggest <String, Object> so this
// could lead to some nasty problems one day. Especially if JEE spec includes
// generics for its Servlet API soon.
//
// -= Scott O'Bryan =-
// TODO: The following should be made available to the Portal. This is not trivial
// because this just re-invokes the filter chain with a new set of parameters.
// In the portal environment, this must rerun the portlet without the use of
// filters until Portlet 2.0.
request = _getRequest(ec);
ec.setRequest(request);
}
chain.doFilter(request, response);
if(isHttpReq)