6 Replies Latest reply on Jul 28, 2008 10:16 AM by kash_meu

    A4J Portlet

      Hello All,

      I am using a4j in my project. When I use a4j with jsf, it works smoothly. But when I add Portlet capabilities to this project, and perform an a4j support action, this page refreshes. Please help me.

      Regards,
      Kashif

        • 1. Re: A4J Portlet
          hsheth

          its running in my portlet.
          Can u please send me your web.xml and portlet.xml?
          so i can give u a answer

          • 2. Re: A4J Portlet

            web.xml

            
            <?xml version="1.0" encoding="UTF-8"?>
            <web-app xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
             <context-param>
             <param-name>javax.faces.CONFIG_FILES</param-name>
             <param-value>/WEB-INF/faces-config.xml</param-value>
             </context-param>
             <servlet>
             <servlet-name>Faces Servlet</servlet-name>
             <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
             <load-on-startup>0</load-on-startup>
             </servlet>
             <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>*.faces</url-pattern>
             </servlet-mapping>
             <welcome-file-list>
             <welcome-file>index.jsp</welcome-file>
             </welcome-file-list>
            
             <context-param>
             <param-name>org.richfaces.SKIN</param-name>
             <param-value>blueSky</param-value>
             </context-param>
             <filter>
             <display-name>RichFaces Filter</display-name>
             <filter-name>richfaces</filter-name>
             <filter-class>org.ajax4jsf.Filter</filter-class>
             </filter>
             <filter-mapping>
             <filter-name>richfaces</filter-name>
             <servlet-name>Faces Servlet</servlet-name>
             <dispatcher>REQUEST</dispatcher>
             <dispatcher>FORWARD</dispatcher>
             <dispatcher>INCLUDE</dispatcher>
             </filter-mapping>
            
            
            
            </web-app>
            
            
            






            portlet.xml
            <?xml version='1.0' encoding='UTF-8' ?>
            <portlet-app
             xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd'
             xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
             xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd'
             version='1.0'>
            
             <portlet>
             <description>JSF Sample Portlet</description>
             <portlet-name>jsfsampleportlet</portlet-name>
             <display-name>JSF Sample Portlet</display-name>
             <!-- You must use this Portlet implementation class -->
             <portlet-class>
             com.sun.faces.portlet.FacesPortlet
             </portlet-class>
            
             <!-- This is a required parameter and must point to the first page of the JSF Application -->
             <init-param>
             <description>Portlet init view page</description>
             <name>com.sun.faces.portlet.INIT_VIEW</name>
             <value>/view.jsp</value>
             </init-param>
            
             <init-param>
             <description>Portlet init view page</description>
             <name>com.sun.faces.portlet.INIT_EDIT</name>
             <value>/index.jsp</value>
             </init-param>
            
            
             <supports>
             <mime-type>text/html</mime-type>
             <portlet-mode>VIEW</portlet-mode>
             <portlet-mode>EDIT</portlet-mode>
            
             </supports>
             <portlet-info>
             <title>JSF Sample Portlet</title>
             <short-title>jsfsampleportlet</short-title>
             </portlet-info>
             </portlet>
            
            
            </portlet-app>


            • 3. Re: A4J Portlet
              hsheth

              Hi

              r u using Jboss application server?
              or any other?
              and is it your full web.xml?
              becoz i think u r missing some filter

              • 4. Re: A4J Portlet

                Yes, there is my full web.xml. What might be I missing?

                I am using GlassFish with Portlet Container by Open Portal.

                • 5. Re: A4J Portlet
                  hsheth

                  i think in your web.xml u r filtering only jsf request
                  u should add the another filter for xml request.
                  like a4jfilter..........

                  • 6. Re: A4J Portlet

                    Can you please explain it a bit?