2
votes

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?

1

1 Answers

1
votes

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.