9 Replies Latest reply on Feb 4, 2013 3:00 PM by chomba

    Glassfish V3.1

    rsoika

      Hi,

       

      the latest release of Glassfish V3.1 is available since a view days.

      To me it seems that it is no longer possible to deploy web applications using RichFaces 3.3.3.
      I have tested some of my projects which were running before on Glassfish 3.0.1.

      I know that there wase the trick running RichFaces 3 on JSF 2. So I use RichFaces richfaces-impl-jsf2 3.3.3.final and also added the web.xml param

      javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER = false.

       

      The module deployes but I got the following error message when I try to access a richfaces page :

       

      Illegal attempt to set ViewHandler after a response has been rendered.

       

      Has anybody tested RichFaces 3.3.3 with Glassfish V3.1 ?

       

      Thanks for help

       

      Ralph

        • 1. Glassfish V3.1
          ilya40umov

          Look at this article:

          http://community.jboss.org/wiki/RichFaces333andJSF20

          It clearly says:

          <context-param>
               <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
               <param-value>true</param-value>
          </context-param>

          • 2. Glassfish V3.1
            rsoika

            Hi Ilya,

            sorry this was a fault in my posting. I meant "true".

            And it seems no longer to work :-/

            • 3. Glassfish V3.1
              ilya40umov

              Have you put facelets 1.1.15.B1 to the project?

              P.S. I think if the same project was working fine on GF 3.0.1 and it stopped working on GF 3.1 it probably means a problem with the lates JSF implementaion. So may be it's wrong forum for asking about it.

              • 4. Re: Glassfish V3.1
                rsoika

                yes I tested also faclets 1.1.15.B1

                This is my current maven dependecy setting:

                 

                {code:xml}

                <!-- JEE Dependencies -->

                  <dependency>

                  <groupId>javax</groupId>

                  <artifactId>javaee-api</artifactId>

                  <version>6.0</version>

                  <scope>provided</scope>

                  </dependency>

                  <dependency>

                  <groupId>com.sun.facelets</groupId>

                  <artifactId>jsf-facelets</artifactId>

                  <version>1.1.15.B1</version>

                  </dependency>

                 

                  <!-- RichFaces -->

                  <dependency>

                  <groupId>org.richfaces.ui</groupId>

                  <artifactId>richfaces-ui</artifactId>

                  <version>3.3.3.Final</version>

                  </dependency>

                    <dependency>

                       <groupId>org.richfaces.framework</groupId>

                       <artifactId>richfaces-impl-jsf2</artifactId>

                       <version>3.3.3.Final</version>

                     </dependency>

                </dependencies>

                 

                {code}

                • 5. Glassfish V3.1
                  rsoika

                  Hi,

                  I still get no luck to deploy richfaces 3.3.3.final on Glassfish 3.1.

                  Is there any Richfaces demo application available which I can test on Glassfish 3.1?

                   

                  thanks for help

                  ====

                  ralph

                  • 6. Re: Glassfish V3.1
                    boy18nj

                    check out this post if it helps-

                     

                    http://www.techbrainwave.com/?p=104

                     

                     

                    P.S. Although outdated but the idea is same.

                    • 7. Re: Glassfish V3.1
                      rsoika

                      hi, thanks for your reply.

                      But this did not help me. I develop RichFaces Applications since some years. And my only problem is that my applications did not run on Glasfish V 3.1.

                      I am using RichFaces 3.3.3.final. And I have different web apps running on Glassfish 2.1 and Glassfish 3.0.1. But I can not figure out why the applications did not run on the current new available Glassfish release V 3.1.

                      Has anybody succeeded in deploying Richfaces on Glassfish 3.1?

                       

                      thanks for help

                      Ralph

                      • 8. Re: Glassfish V3.1
                        rsoika

                        ok - finally it seems that I found the solution.

                        After I added the AjayViewHandler into my faces-config.xml my application works fine on Glassfish V 3.1

                        I have now the following configuration in my faces-config.xml:

                         

                        <application>

                                            <message-bundle>bundle.global</message-bundle>

                                            <locale-config>

                                                      <default-locale>en</default-locale>

                                                      <supported-locale>en</supported-locale>

                                            </locale-config>

                                            <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>

                                            <view-handler>org.ajax4jsf.application.AjaxViewHandler</view-handler>

                                  </application>

                         

                         

                        I found this solution/workarround in this post:

                         

                        https://issues.jboss.org/browse/JBAS-8375?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#issue-tabs

                        • 9. Re: Glassfish V3.1
                          chomba

                          Hello habe the same problem and solve it as follows Download the library from jsf to Glasfish javax.faces-1.2.17 http://javaserverfaces.java.net/ habe to add it to my project (war)
                          instantiate the class and solve the problem ViewHandlerImpl.class

                           

                          faces-config file was thus (70% of the credit to Ralph Soika)
                          <application>
                          <locale-config>
                          <default-locale> is </ default-locale>
                          <supported-locale> en </ supported-locale>
                          <supported-locale> es </ supported-locale>
                          </ Locale-config>
                          <message-bundle> MessageResources </ message-bundle>
                          <view-handler> com.sun.faces.application.ViewHandlerImpl </ view-handler>
                          <view-handler> org.ajax4jsf.application.AjaxViewHandler </ view-handler>
                          </ Application>

                           

                           

                           

                           

                           

                           

                          ***-------------------------------------------***********-----------

                           

                          IN SPANISH.

                           

                          Hola tube el mismo problema y lo solucione de la siguiente manera descarge la biblioteca jsf para glasfish desde http://javaserverfaces.java.net/  javax.faces-2.1.17 tube que añadirla a mi proyecto (war)

                          instancie la clase ViewHandlerImpl y solucione el problema ose el archivo faces-config quedo asi (70% del credito a Ralph Soika)

                          <application>

                                  <locale-config>

                                      <default-locale>es</default-locale>

                                      <supported-locale>en</supported-locale>

                                      <supported-locale>es</supported-locale>

                                  </locale-config>

                                  <message-bundle>MessageResources</message-bundle>

                                  <view-handler>com.sun.faces.application.ViewHandlerImpl</view-handler>

                                  <view-handler>org.ajax4jsf.application.AjaxViewHandler</view-handler>

                              </application>

                          saludos