struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sekar, Sowmya" <sse...@ucsd.edu>
Subject Struts with JSF and Tiles error
Date Thu, 25 Feb 2010 19:59:54 GMT
Hi,
I have an existing Struts 1 application with Tiles and JSP. I would like to use JSF 2 components
instead of the JSP tags and leave the business logic and actions as is.
These are the steps I followed :

1.       Copied jsf-impl , jsf-api.jar and struts-faces-1.3.8.jar in my web-inf/lib folder
of my application

2.       Configured the faces servlet in my web.xml
      <servlet>
      <servlet-name>faces</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
      <load-on-startup>1</load-on-startup>

      </servlet>


      <servlet-mapping>
      <servlet-name>faces</servlet-name>
      <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>

  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>

  </servlet-mapping>



I also configured my action servlet as follows :


  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>

    <load-on-startup>2</load-on-startup>

 </servlet>



I forwarded a menu option to a page through an action class using tiles. The target page is
/faces/pages/home.jsp.

After the action is executed, it throws the following error -


WARNING: executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1ebf89f) threw
exception
java.lang.NullPointerException

      at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:183)



FacesContext is returned as null.





Please help









Sowmya Sekar


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message