2

Although JRebel can reload Java class changes in my project, it can not reload JSF changes. When I change a JSF file I can not see any logs etc. Here is my rebel.xml:

<classpath>
    <dir name="${projectDir}/classes">
    </dir>
</classpath>

<web>
    <link target="/WEB-INF">
        <dir name="${projectDir}/war/conf">
        </dir>
    </link>
</web>

All JSF files are in ${projectDir}/war/. I use JBoss and IntelliJ IDEA. In the project, Ant creates an ear file and deploys it to JBoss.

How can I use JRebel to reload JSF files? Should web tag in rebel.xml point JSF files or compiled XHTML?

Magnilex
  • 11,584
  • 9
  • 62
  • 84
mokarakaya
  • 723
  • 1
  • 11
  • 22

1 Answers1

1

I have had a similar problem, and for me it was the parameter javax.faces.FACELETS_REFRESH_PERIOD which needs to be set to 0. The parameter is set in the web.xml.

<context-param>
    <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
    <param-value>0</param-value>
</context-param>

There is a good blog entry here describing the different available configuration parameters:

Time in seconds that facelets should be checked for changes since last request. When a page is requested, what interval in seconds should the compiler check for changes. If you don't want the compiler to check for changes once the page is compiled, then use a value of -1. Setting a low refresh period helps during development to be able to edit pages in a running application.

So in short, setting the value to 0 during development should enable immediate reloading of the files.

Magnilex
  • 11,584
  • 9
  • 62
  • 84
  • It is better to set the PROJECT_STAGE to development during development. This also sets the refresh to 0 and lots of other interesting information shows up then when you make errors – Kukeltje May 07 '15 at 13:15
  • @Kukeltje Fair enough. Shouldn't you add that as your own answer? – Magnilex May 07 '15 at 13:18
  • No, go ahead, add it to your answer – Kukeltje May 07 '15 at 18:06
  • I've applied the configuration here; http://stackoverflow.com/questions/7512414/jsf-and-automatic-reload-of-xhtml-files But I still have same problem. Thank you for suggestion. – mokarakaya May 08 '15 at 05:39