The specification for jakarta.faces.FACELETS_REFRESH_PERIOD currently states the following (1):
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.The runtime must also consider the facelets.REFRESH_PERIOD param name as an alias to this param name for backwards compatibility with existing facelets tag libraries. If ProjectStage is set to Production and this value is not otherwise specified, the runtime must act as if it is set to -1.
What is not defined in the specification is any default value for the DevelopmentProjectStage. This has led to implementations having
different defaults and it would be nice to define a consistent behavior within the specification.
The discussion sparked from a MyFaces issue (2).
The MyFaces implementation always defaults to -1 if the parameter is not explicitly defined regardless of the ProjectStage defined (3).
The Mojarra implementation defaults to -1 in the ProductionProjectStage and 2 in the DevelopmentProjectStage if the parameter is not explicitly defined (4)/(5).
The proposal for discussion is the default for the DevelopmentProjectStage, in MyFaces, we've discussed this being set to 0 if the parameter is not explicitly set in the application.
The specification for
jakarta.faces.FACELETS_REFRESH_PERIOD
currently states the following (1):What is not defined in the specification is any default value for the
Development
ProjectStage
. This has led to implementations having different defaults and it would be nice to define a consistent behavior within the specification.The discussion sparked from a MyFaces issue (2).
The MyFaces implementation always defaults to
-1
if the parameter is not explicitly defined regardless of the ProjectStage defined (3).The Mojarra implementation defaults to
-1
in theProduction
ProjectStage
and2
in theDevelopment
ProjectStage
if the parameter is not explicitly defined (4)/(5).The proposal for discussion is the default for the
Development
ProjectStage
, in MyFaces, we've discussed this being set to0
if the parameter is not explicitly set in the application.(1): https://jakarta.ee/specifications/faces/4.0/apidocs/jakarta/faces/application/viewhandler#FACELETS_REFRESH_PERIOD_PARAM_NAME (2): https://issues.apache.org/jira/browse/MYFACES-4608 (3): https://github.com/apache/myfaces/blob/main/api/src/main/java/jakarta/faces/application/ViewHandler.java#L125 (4): https://github.com/eclipse-ee4j/mojarra/blob/8fe7baef662c7b8be28b80e3506b7c7a5b8cd0ce/impl/src/main/java/com/sun/faces/application/ApplicationAssociate.java#L625 (5): https://github.com/eclipse-ee4j/mojarra/blob/master/impl/src/main/java/com/sun/faces/config/WebConfiguration.java#L767