Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.1.4
-
None
-
None
-
JBoss 4.0 - JBoss 4.0.4
Description
If I have a JSF portlet, and it is given the chance to initialize the session, after redeploying the application I get an NPE:
Caused by: java.lang.NullPointerException
at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:393)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266)
I have worked around the problem by creating my own portlet and overriding one function:
(the cause of the NPE is request.getPortletSession().getAttribute(CURRENT_FACES_CONTEXT) being null after redeployment)
protected void facesRender(RenderRequest request, RenderResponse response)
throws PortletException, java.io.IOException {
if (sessionTimedOut(request) || request.getPortletSession().
getAttribute(CURRENT_FACES_CONTEXT) == null)
super.facesRender(request, response);
}