I'm trying to set the project stage for JavaServer Faces in a GlassFish application server v3 with a JNDI property.
I set the stage property to Development stage, but my application received always the Production stage.
I use GlassFish Server Open Source Edition 3.1 (build 43) on a windows system.
For rendering the project stage in the JSF page I use this:
<h:outputText value="Stage:#{facesContext.application.projectStage}"/>
Is anything else necessary to use the project stage in an application? The application has no web.xml file.
Everything is correct, but instead of
stage=Development
, usevalue = Development
, i.e. replacestage
withvalue
in the property name field.You need this in your web.xml. It works with 'stage' then.
This maps the global JNDI property of GF to the reference lookup in JSF.