PortletBridge 3.0.0.Beta3 + JSF2: how to have externalContext.getRequestPathInfo not null?
abaudry May 22, 2012 10:19 AMHello everybody,
in my project we are trying to work with PortletBridge 3.0.0.Beta3, JSF 2.1.2 and OpenFaces 3.x (NightlyBuild, we use OpenFaces because RichFaces does not support IE6). We encounter an exception:
java.lang.NullPointerException
at org.openfaces.application.OpenFacesResourceHandler.isDynamicResourceRequest(OpenFacesResourceHandler.java:118)
at org.openfaces.application.OpenFacesResourceHandler.isResourceRequest(OpenFacesResourceHandler.java:112)
at javax.faces.application.ResourceHandlerWrapper.isResourceRequest(ResourceHandlerWrapper.java:137)
at com.sun.faces.application.resource.ResourceImpl.isResourceRequest(ResourceImpl.java:429)
at com.sun.faces.application.resource.ResourceImpl.getResponseHeaders(ResourceImpl.java:208)
at javax.faces.application.ResourceWrapper.getResponseHeaders(ResourceWrapper.java:110)
at javax.faces.application.ResourceWrapper.getResponseHeaders(ResourceWrapper.java:110)
at org.jboss.portletbridge.application.resource.PortletResourceHandler.handleHeaders(PortletResourceHandler.java:199)
at org.jboss.portletbridge.application.resource.PortletResourceHandler.handleResourceRequest(PortletResourceHandler.java:145)
at org.jboss.portletbridge.application.resource.PortletResourceHandler.handleResourceRequest(PortletResourceHandler.java:110)
at org.jboss.portletbridge.bridge.controller.Jsf20ControllerImpl.renderResource(Jsf20ControllerImpl.java:299)
at org.jboss.portletbridge.PortletBridgeImpl.doFacesRequest(PortletBridgeImpl.java:272)
at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:463)
It appears that FacesContext.getExternalContext().getRequestPathInfo() is null
In a debug view when I get the external context I have:
pathInfo: null
servletPath: "/pages/authnetifier.xhtml"
viewId: "/pages/authentifier.xhtml"
So I suppose the problems is due to a lack of configuration, but where and how?
My researches lead me to think that my faces-config.xml should be including some more configuration like
<factory>
<external-context-factory>org.jboss.portletbridge.context.PortletExternalContextFactoryImpl</external-context-factory>
<partial-view-context-factory>org.jboss.portletbridge.context.PortletPartialViewContextFactoryImpl</partial-view-context-factory>
</factory>
Could you help me please?
Best regards,
Alain BAUDRY