org.apache.myfaces.orchestra.requestParameterProvider.jsf
Class RequestParameterFacesContextFactory

java.lang.Object
  extended by javax.faces.context.FacesContextFactory
      extended by org.apache.myfaces.orchestra.requestParameterProvider.jsf.RequestParameterFacesContextFactory

public class RequestParameterFacesContextFactory
extends javax.faces.context.FacesContextFactory

Ensure that a custom wrapper is put aroung the HttpServletResponse so that encodeURL can be intercepted and modified.

There is a servlet filter (RequestParameterServletFilter) that does this in the obvious way, but it is a nuisance to have to set up filters in the web.xml. This class implements a sneaky hack to get this to happen automatically for JSF applications, ie no servlet filter is needed when this is specified in the faces-config.xml file as the FacesContextFactory.

If you have to deal with a mixed environment e.g. JSP/JSF it would be better to use the RequestParameterServletFilter.


Constructor Summary
RequestParameterFacesContextFactory(javax.faces.context.FacesContextFactory original)
           
 
Method Summary
 javax.faces.context.FacesContext getFacesContext(java.lang.Object context, java.lang.Object request, java.lang.Object response, javax.faces.lifecycle.Lifecycle lifecycle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestParameterFacesContextFactory

public RequestParameterFacesContextFactory(javax.faces.context.FacesContextFactory original)
Method Detail

getFacesContext

public javax.faces.context.FacesContext getFacesContext(java.lang.Object context,
                                                        java.lang.Object request,
                                                        java.lang.Object response,
                                                        javax.faces.lifecycle.Lifecycle lifecycle)
                                                 throws javax.faces.FacesException
Specified by:
getFacesContext in class javax.faces.context.FacesContextFactory
Throws:
javax.faces.FacesException


Copyright 2007 The Apache Software Foundation. All Rights Reserved.