2 Replies Latest reply on May 27, 2008 10:05 PM by Wesley Hales

    JSF portlet demo issues

    Robert Garrido Newbie

      Hi,

      I downloaded the latest version of the Jboss portal bundled version 2.6.5. I'm trying to run the JSFPortlet demo and unfortunetly I get the error:


      Caused by: javax.portlet.PortletException: org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/index.jsp at line 4
      
      1: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      3:
      4: <f:view>
      5: <div align="center">
      6: <h:form>
      7: <h:panelGrid columns="2">
      
      Stacktrace:
       at org.jboss.portal.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:91)
       at org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:167)
       ... 242 more
      Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/index.jsp at line 4
      
      1: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      3:
      4: <f:view>
      5: <div align="center">
      6: <h:form>
      7: <h:panelGrid columns="2">
      
      Stacktrace:
       at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:415)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
       at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
       at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
       at org.jboss.portal.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:86)
       ... 243 more
      Caused by: java.lang.RuntimeException: Cannot find FacesContext
       at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1796)
       at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1613)
       at org.apache.jsp.WEB_002dINF.jsp.index_jsp._jspx_meth_f_005fview_005f0(index_jsp.java:98)
      
      



      The web.xml file is empty as it is in the demo download project taken from http://docs.jboss.org/jbportal/v2.6/referenceGuide/html/tutorials.html#d0e1985

      Thanks a lot!


        • 1. Re: JSF portlet demo issues
          Robert Garrido Newbie

          I forgot to mention that if I modify web.xml to the snippet shown below the problems still persist.

          <?xml version="1.0"?>
          <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
           version="2.4">
          
           <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>*.faces</url-pattern>
           </servlet-mapping>
          
           <!-- Welcome files -->
           <welcome-file-list>
           <welcome-file>index.jsp</welcome-file>
           <welcome-file>index.html</welcome-file>
           </welcome-file-list>
          
          </web-app>


          • 2. Re: JSF portlet demo issues
            Wesley Hales Master

            If you are using 2.6.5 then I recommend creating your JSF portlet with the portletbridge http://www.jboss.org/portletbridge/