Topic
3 replies Latest Post - ‏2013-04-29T07:29:52Z by hampe98
hampe98
hampe98
12 Posts
ACCEPTED ANSWER

Pinned topic JSF - Changes to xhtml files does not show

‏2013-04-16T12:33:48Z |

Hi,

I´m running a JSF 2.1 application in Liberty with the context-param javax.faces.ProjectStage=Development. Changes to phaselisteners and UIComponents makes Liberty to restart the app but changes to any xhtml file does not. In the full profile, making changes to a xhtml file is reflected immediatly without app restarts.

Is this the intended behaviour?

Regards,

Hampus 

  • PaulNicolucci
    PaulNicolucci
    1 Post
    ACCEPTED ANSWER

    Re: JSF - Changes to xhtml files does not show

    ‏2013-04-17T17:19:42Z  in response to hampe98

    Hello Hampus,

    MyFaces does cache facelets.  There is a difference between the Production and Development Project Stages.  Basically there is a refresh interval where the facelet compiler will refresh a facelet.  If using the Production Project Stage then JSF 2.0 won't refresh, simply put the facelet is not reloaded so the changes won't be seen.

    If you are using the Development Project Stage then a refresh interval is set to I believe 2000ms.  This looks to be what you have configured.

    Just for completeness there is a context parameter to configure the refresh interval:  javax.faces.FACELETS_REFRESH_PERIOD

    As for a difference in behavior between the Liberty profile and the full profile I did some testing of my own and I don't see any difference in behavior.  In both profiles if using the Development Project Stage and a change is made to a facelet that change is then reflected as it seems you are expecting.

    We do provide a JSF 2.0 implementation based on MyFaces in both profiles. It is worth noting as well that the jsf-2.0 feature in Liberty only supports JSF 2.0.  

    Are you bundling your own JSF implementation in your application?  I see you mention JSF 2.1 in your question.

    Thanks,

    Paul

    • hampe98
      hampe98
      12 Posts
      ACCEPTED ANSWER

      Re: JSF - Changes to xhtml files does not show

      ‏2013-04-18T18:29:31Z  in response to PaulNicolucci

      Hi,

      I just assumed Jsf2.1 due to the JSF facet in eclipse.

       

      regards,

      hampus

  • hampe98
    hampe98
    12 Posts
    ACCEPTED ANSWER

    Re: JSF - Changes to xhtml files does not show

    ‏2013-04-29T07:29:52Z  in response to hampe98

    Hi,

    Sorry about this but I have been blind and used "javax.faces.ProjectStage" instead of "javax.faces.PROJECT_STAGE". Now it works as expected.

    Regards,

    Hampus