7 Replies Latest reply on Dec 7, 2009 9:51 AM by robert.raksi

    No reRender with tomcat 6

    fkj

      When I redeploy an application in tomcat 6, reRender doesn't happen at all. I've monitored through Firebug and request / post / response happen correctly, but no reRender. After some time the application starts working fine and it goes until I redeploy it. This reRender bug propagates to all RichFaces applications on the server. The applications work fine with glassfish and locally with tomcat.

      I have even copied server's tomcat to my work station and works fine. Something is messed up with the server.

      Any help is appreciated. I'm trying to solve this since yesterday morning, it's driving me crazy!

      Thanks,
      Help

        • 1. Re: No reRender with tomcat 6
          nbelaevski

          Hello,

          We've observed such behavior deploying application built in one timezone to the server located in another. The problem with this is because server deployer unpacks application archive setting original (of timezone where the application was built in) creation date for application files. This leads to the fact that last modification time is in future for all application resources, so they are refreshed constantly (that's seen as messages in server console and in logs). And the problem itself is caused by Facelets creating new implicit IDs for components on each request, so JSF cannot match components that were rendered previously with the new view. This breaks AJAX updates.

          • 2. Re: No reRender with tomcat 6

            I had a similar problem when packaging facelets templates in jars on JBoss.


            I had to add

            <context-param>
             <param-name>facelets.REFRESH_PERIOD</param-name>
             <param-value>-1</param-value>
             </context-param>


            to my web.xml to disable reloading of the templates.

            • 3. Re: No reRender with tomcat 6
              fkj

               

              "supernovasoftware.com" wrote:
              I had a similar problem when packaging facelets templates in jars on JBoss.


              I had to add

              <context-param>
               <param-name>facelets.REFRESH_PERIOD</param-name>
               <param-value>-1</param-value>
               </context-param>


              to my web.xml to disable reloading of the templates.


              Exactly, problem started here after packing the templates in a JAR.

              Setting negative refresh period solved the problem.

              Thanks a lot,
              Felipe

              • 4. Re: No reRender with tomcat 6
                robert.raksi

                Isn't there another way around this problem? I noticed that setting the refresh period to -1 disables the reloading of all xhtml and xml files. This is not too good on a developement environment.

                • 5. Re: No reRender with tomcat 6
                  nbelaevski

                  Try the latest 1.1.15 Facelets version.

                  • 6. Re: No reRender with tomcat 6
                    robert.raksi

                     

                    "nbelaevski" wrote:
                    Try the latest 1.1.15 Facelets version.


                    That solved the problem, thanks.

                    We were using facelets that shipped with Seam 2.2.0.GA, according to it's manifest file the version was 1.1.15.B1

                    One minor issue that came up after the jar upgrade:

                    2009.12.07. 13:11:54 com.sun.facelets.tag.jsf.ComponentHandler isRecreateValueExpressionsOnBuildBeforeRestore
                    WARNING: facelets.RECREATE_VALUE_EXPRESSION_ON_BUILD_BEFORE_RESTORE is set to 'true' but facelets.BUILD_BEFORE_RESTORE is set to 'false' or unset. To use facelets.RECREATE_VALUE_EXPRESSION_ON_BUILD_BEFORE_RESTORE you must also set facelets.BUILD_BEFORE_RESTORE to 'true'!
                    


                    I dont know what these properties do but I'll do some docs reading :)

                    I'll link the issues that I found related to this problem in the facelets issue tracker:

                    https://facelets.dev.java.net/issues/show_bug.cgi?id=278
                    https://facelets.dev.java.net/issues/show_bug.cgi?id=286
                    https://facelets.dev.java.net/issues/show_bug.cgi?id=336

                    • 7. Re: No reRender with tomcat 6
                      robert.raksi

                      Well, google knows nothing about facelets.RECREATE_VALUE_EXPRESSION_ON_BUILD_BEFORE_RESTORE so it doesn't exist :)