3 Replies Latest reply on Jun 20, 2006 6:22 AM by asdf asdf

    JSF Deployment problem in JBoss, but not Tomcat

    Mr. Orange Newbie

      Hi. I have tried to deploy a JSF application into JBoss and I get a java.lang.NullPointerException. But when I deploy it in Tomcat, it works fine. I have the latest versions of both. Here is the error message.

      java.lang.NullPointerException

      javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
       javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
       org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
       org.apache.jsp.pages.Home_jsp._jspService(org.apache.jsp.pages.Home_jsp:98)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
       com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
       com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
       com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
       com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
       org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
       org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
       org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:46)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      


      I have included the actionlistener. Here is the web.xml file.

      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
       <context-param>
       <param-name>javax.faces.CONFIG_FILES</param-name>
       <param-value>/WEB-INF/faces-config.xml</param-value>
       </context-param>
      
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.jsf</url-pattern>
       </servlet-mapping>
      
      
      </web-app>
      


      I have a index.jsp page
      <html>
       <body>
       <jsp:forward page="/pages/Home.jsf" />
       </body>
      </html>
      


      The page redirects to a pages directory where all the .jsp files are located. I assume the JSF servlet is suppose to convert these to .jsf extension and process them since that looks like what the servlet is doing in Tomcat 5. But in JBoss, I get the exception.

      Any help would be much appreciated. I have been hunting this error all week and tried everything. Any help would be much appreciated.