users@glassfish.java.net

JSF1.1 to 1.2 upgrade affects the RequestDispatcher functionality?

From: <glassfish_at_javadesktop.org>
Date: Sun, 18 May 2008 01:55:08 PDT

Hi, my webhotell just upgraded to Tomcat 6, JSK 1.6, JSF 1.2 from previous Tomcat5.5, JDK1.5, JSF 1.1.
The following code worked just fine under the previous configuration:

void processReply( HttpServletRequest request, HttpServletResponse response ) {
  FacesContext context = FacesContext.getCurrentInstance();
  ViewHandler vh = context.getApplication().getViewHandler();
                                   context.setViewRoot(vh.createView( context, "/client/websessions/loggedin.jsp" ) );

  RequestDispatcher dispatcher = request.getRequestDispatcher("/client/websessions/loggedin.jsp" );
  dispatcher.include( request, response );
}

but after the upgrade I get a blank page in return that contains nothing, no headers no body no nothing. Catalina.out shows:

2008-may-17 16:48:52 com.sun.faces.lifecycle.Phase doPhase
SERIOUS: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /client/nodeResultProcessor.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl_at_1bceb82]
2008-may-17 16:48:52 org.apache.catalina.core.StandardWrapperValve invoke
SERIOUS: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException

Does anyone know what causes the problem? Did my code work just by chance in the previous version but is in fact defect?
[Message sent by forum member 'filipr' (filipr)]

http://forums.java.net/jive/thread.jspa?messageID=275043