Details
Description
When a resource URL such as /icefaces/resource/MjAyNjQwNTE1MA==/icefaces.jpg
is obtained via the call
facesContext.getApplication().getViewHandler().getResourceURL(context, path)
the resulting URL:
http://localhost:8080/component-showcase-portlet/icefaces/resource/MjAyNjQwNTE1MA==/icefaces.jpg
Cannot be fetched from the Faces Servlet (in the example mapped to /icefaces/*):
java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade cannot be cast to javax.portlet.PortletContext
org.portletfaces.bridge.context.ExternalContextFactoryImpl.getExternalContext(ExternalContextFactoryImpl.java:32)
com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:89)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:298)
It should be possible for the PortletFaces Bridge to detect that it is serving a non-Portlet request and delegate to the JSF factory chain for this request.