0 Replies Latest reply on Feb 3, 2012 2:52 AM by Ernest Molik

    Problem with jBoss 6.1.0 Final and IceFaces 1.8.2

    Ernest Molik Newbie

      Hello.

      I'm trying to run small application (app using IceFaces 1.8.2).

      Application have only one java class and three pages.

      Application is deploying and running but when I wont to redirect from page index.jsp to "main.jspx" I'm getting error

       

      error

      org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 3

       

       

      1: <html>

      2:  <body>

      3:   <jsp:forward page="/pages/main.jsf" />

      4:  </body>

      5: </html>

       

       

       

       

      Stacktrace:

                org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:498)

                org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)

                org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)

                org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)

                javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)

                com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:469)

                com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)

                com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)

                com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)

                com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

                com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

                javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

       

       

       

       

      root cause

       

       

      javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: Can't parse stream for /pages/main.jspx Failed to execute JSP lifecycle.

                com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:158)

                javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)

                org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)

                org.apache.jsp.index_jsp._jspService(index_jsp.java:57)

                org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

                javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)

                org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)

                org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)

                javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)

                com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:469)

                com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)

                com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)

                com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)

                com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

                com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

                javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

       

       

       

       

       

      With this pagas below application working (also IceFaces tags)

       

      index.html

      <html>

         <head>

            <meta http-equiv="Refresh" content= "0; URL=index.faces"/>

            <title>Start Web Application</title>

         </head>

         <body>

            <p>Please wait for the web application to start.</p>  

         </body>

      </html>

       

       

       

      index.jsp (this page working)

      <%@ page import="java.util.*" %>

      <%@ page import="org.jboss.jsf.unit.framework.*" %>

      <%@ page import="java.util.logging.*" %>

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

      <%@ taglib uri="http://www.icesoft.com/icefaces/component" prefix="ice" %>

      <HTML>

      <f:view> 

         <h:outputText value="Hello World!" id="hello"/>

         <br/>

         <ice:outputText value="IceFaces TAG test"/>

      </f:view>

      <p>JSF <% out.print(Environment.getJSFMajorVersion()); %>.<% out.print(Environment.getJSFMinorVersion()); %></p>

      <%

      ResourceBundle bundle = ResourceBundle.getBundle("com.sun.faces.LogStrings");

      String mojarraVersion = bundle.getString("jsf.config.listener.version");

      %>

      <p>Mojarra Version = <%=mojarraVersion%></p>

      <%

      Logger myLogger = Logger.getLogger("jsflogger", "com.sun.faces.LogStrings");

      myLogger.log(Level.INFO, "jsf.config.listener.version", "Stan's test. Real version=" + Environment.getJSFMajorVersion() + "." + Environment.getJSFMinorVersion());

      %>

      <%

      Logger stansLogger = Logger.getLogger("stanslogger", "stantest");

      stansLogger.log(Level.INFO, "mymessage");

      %>

      </HTML>

       

       

       

      web.xml

      <!DOCTYPE web-app PUBLIC

         "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

         "http://java.sun.com/dtd/web-app_2_3.dtd">

      <web-app>

          <context-param>

              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

              <param-value>server</param-value>

          </context-param>

          <context-param>

              <param-name>javax.faces.CONFIG_FILES</param-name>

              <param-value>/WEB-INF/faces-config.xml</param-value>

          </context-param>

        <context-param>

            <param-name>com.sun.faces.displayConfiguration</param-name>

            <param-value>true</param-value>

         </context-param>

        <context-param>

            <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

            <param-value>false</param-value>

        </context-param> 

         <context-param>

            <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>

            <param-value>Mojarra-1.2</param-value>

         </context-param>

         <servlet>

            <servlet-name>Faces Servlet</servlet-name>

            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

            <load-on-startup>1</load-on-startup>

         </servlet>     

          <servlet>

               <servlet-name>Persistent Faces Servlet</servlet-name>

               <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>

               <load-on-startup>1</load-on-startup>

           </servlet>

          <servlet-mapping>

              <servlet-name>Persistent Faces Servlet</servlet-name>

              <url-pattern>*.jsf</url-pattern>

          </servlet-mapping>

         <servlet-mapping>

            <servlet-name>Faces Servlet</servlet-name>

            <url-pattern>*.faces</url-pattern>

         </servlet-mapping> 

         <welcome-file-list>

            <welcome-file>index.html</welcome-file>

         </welcome-file-list>

      </web-app>

       

       

      This pages don't work and cauze exception

       

      index.jsp

      <html>

      <body>

        <jsp:forward page="/pages/main.jsf" />

      </body>

      </html>

       

      main.jspx

      <jsp:root xmlns:h="http://java.sun.com/jsf/html"

                xmlns:f="http://java.sun.com/jsf/core"

                xmlns:ice="http://www.icesoft.com/icefaces/component"

                xmlns:jsp="http://java.sun.com/JSP/Page">

       

       

      <f:view>

          <html>

          <body>

              <ice:outputText value="IceFaces TAG test"/>

          </body>

          </html>

      </f:view>

      </jsp:root>

       

      So why this happening and how to fix this?

       

      I'm using this jars in my app (jar are in war).

      jar

      backport-util-concurrent-2.2.jar

      commons-beanutils-1.8.0.jar

      commons-collections-3.2.jar

      commons-digester-1.5.jar

      commons-el-1.0.jar

      commons-fileupload-1.2.jar

      commons-logging-1.1.jar

      commons-logging-api-1.1.jar

      FastInfoset-1.2.2.jar

      icefaces-1.8.2.jar

      icefaces-comps-1.8.2.jar

      icefaces-facelets-1.8.2.jar

      jasper-runtime-5.5.23.jar

      servlet-api-2.4.jar

      xercesImpl-2.7.1.jar