Java Reference
In-Depth Information
server, so you need to specify this context parameter only if you want to save state on the
client. See Saving and Restoring State ” on page 113 for information on the advantages
and disadvantages of each location.
To specify where state is saved using NetBeans IDE, do the following.
1. Expand the node of your project in the Projects pane.
2. Expand the Web Pages and WEB-INF nodes under the project node.
3. Double-click web.xml .
4. After the web.xml file appears in the editor pane, click General at the top of
the editor pane.
5. Expand the Context Parameters node.
6. In the Add Context Parameter dialog:
a. Type javax.faces.STATE_SAVING_METHOD in the Param Name field.
b. Type client or server in the Param Value field.
c. Click OK.
More Information: Implementation of State Saving
If state is saved on the client, the state of the entire view is rendered to
a hidden field on the page. The JavaServer Faces implementation saves
the state on the server by default. Duke's Forest saves its state on the
client.
Configuring Project Stage
Project Stage is a context parameter identifying the status of a JavaServer Faces applic-
ation in the software lifecycle. The stage of an application can affect the behavior of the
application. For example, error messages can be displayed during the Development stage
but suppressed during the Production stage.
The possible Project Stage values are as follows:
Development
UnitTest
SystemTest
Production
Project Stage is configured through a context parameter in the web deployment descriptor
file. Here is an example:
Search WWH ::




Custom Search