[My Setup: Java EE 6 application, with EJB3.1, CDI/Weld, JSF2 running on Glassfish 3.0.1]
I just read about the Faces ProjectStage on this page, which is a cool thing. So i configured it in my Web.xml, setting it to Development:
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
Now i want to access the ProjectStage from the JSF view (setting the visibility of specific UI components accordingly).
Therefore i already tried things like an outputtext with the value #{javax.application.projectStage}
, which seems to be null, and i also tried many other variants, with no success. I even don't manage to access the ProjectStage from within Java code (then i could expose it myself with a Bean).
How can i access the PROJECT_STAGE value inside my application?