July 1 2016

javax faces project stage configuration

javax faces project stage configuration

If you are working with JSF project, you should enable the ‘PROJECT STAGE’ for better performance. Project stage in JSF can be configured in web deployment descriptor file (web.xml) as context param.

<context-param>

<param-name>javax.faces.PROJECT_STAGE</param-name>

<param-value>Development</param-value>

</context-param>

The possible Project Stage values are

  • Development
  • UnitTest
  • SystemTest
  • Production

If project stage is not specified, ‘Development’ is considered. The value specified will affect the behavior of the application. Error messages will be displayed for ‘Development’. ‘PRODUCTION’ will turn off some error messages and improves performance.

Value Summary

Development – during development stage

UnitTest – Undergoing unit testing

SystemTest – Undergoing system testing

Production – deployed in production

Following code is to get  project stage in JSF Managed bean

FacesContext.getCurrentInstance().getApplication().getProjectStage()

Following code is to display project stage in JSF page

<h:outputText value=”#{facesContext.application.projectStage}” />


Copyright © 2014. All rights reserved.

Posted July 1, 2016 by answersz in category Jsf

Leave a Comment

Your email address will not be published. Required fields are marked *

*