4 Replies Latest reply on Aug 14, 2006 10:18 AM by Chua Khoon Yong

    Sample Seam + Facelets + Portlet

    Chua Khoon Yong Novice

      dear all,

      I think seam + facelets + portlet would be a good way to do web portal and try to make a sample seam facelets portlet example to start out.

      Using the seam booking example and add in some portlet xml files from the portal example, i got a bunch of errors. Sorry, i'm still new to Jboss so got difficulty to troubleshoot.

      Is there any working sample of seam + facelets + portlet that i could use.

      Really appreciate the help here because have been spending the last week trying to figure this out.

      Many thanks.

        • 1. Re: Sample Seam + Facelets + Portlet
          Stan Silvert Master

          Look under examples/portal

          • 2. Re: Sample Seam + Facelets + Portlet
            Chua Khoon Yong Novice

            dear stan silvert,

            my problem seems to be caused by the following which if removed, things are ok.

            In my web.xml, the following is added to support Tomahawk because i originally used the seam booking sample and added Tomahawk.

            ======


            <filter-name>MyFacesExtensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
            <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
            Set the size limit for uploaded files.
            Format: 10 - 10 bytes
            10k - 10 KB
            10m - 10 MB
            1g - 1 GB

            </init-param>


            <!-- extension mapping for adding , , and other resource tags to JSF-pages -->
            <filter-mapping>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
            <servlet-name>Faces Servlet</servlet-name>
            </filter-mapping>

            <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
            <filter-mapping>
            <filter-name>MyFacesExtensionsFilter</filter-name>
            <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
            </filter-mapping>

            =========

            Not sure if the above got anything to do with the extensionsFilter in the jboss-portal.sar\portal-core.war\WEB-INF\web.xml

            Many thanks.

            • 3. Re: Sample Seam + Facelets + Portlet
              Stan Silvert Master

              This is a known problem with Tomahawk. If you search MyFaces Jira you will find some workarounds, but there is no official fix for this yet.

              Servlet filters are not reliable in a portlet environment. The next version of the portlet spec will address this by adding portlet filters.

              Stan

              • 4. Re: Sample Seam + Facelets + Portlet
                Chua Khoon Yong Novice

                dear stan silvert,

                Just saw the issue tracker facility :) ... sorry new here.
                Would check the JIRA often if in doubts.

                Many thanks to u.