Java Server Faces project stage
JSF 2.0 has introduced a new feature called project stage. Project stage is a new configuration option that allows the application developer/deployer to specify a hint to the JSF implementation regarding the role of the current deployment. Valid values include:
This hint allows the JSF implementation to optimize its behavior for the current stage. For example, the JSF implementation might provide more verbose development-time diagnostics than would be practical for a production environment.
To enabled Project Stage in your web application put the following snippet in your web.xml file.
You can access the project stage using unified expression language :
Writing conditional code with javax.faces.PROJECT_STAGE configuration
Getting the project stage from the FacesContext application object instance.
Interrogating directly the FacesContext using the project stage enumeration
Impossible to change project stage away from development
If you have any remark or questions feel free to put a comment.If you enjoyed this tutorial and want to promote it don't hesitate to click on