Sun GlassFish Enterprise Server v3 Application Deployment Guide

ProcedureTo Unset a Web Context Parameter

Use the unset-web-context-param subcommand in remote mode to unset an environment entry for a deployed web application or module that has been set by using the set-web-env-entry subcommand. There is no need to modify the application's deployment descriptors and repackage and redeploy the application.

This subcommand unsets an environment entry for one of the following items:

When an entry is unset, its value reverts to the value, if any, that is set in the application's deployment descriptor. This subcommand cannot be used to change the value of an environment entry that is set in an application's deployment descriptor. Instead, use the set-web-context-param(1) subcommand for this purpose.

Before You Begin

The application must already be deployed, and the entry must have previously been set by using the set-web-env-entry subcommand. Otherwise, an error occurs.

  1. Ensure that the server is running.

    Remote commands require a running server.

  2. Unset an environment entry by using the unset-web-context-param(1) subcommand.

    Information about the options for the subcommand is included in this help page.

Example 2–22 Unsetting a Servlet Context-Initialization Parameter for a Web Application

This example unsets the servlet context-initialization parameter javax.faces.STATE_SAVING_METHOD of the web application basic-ezcomp.

asadmin> unset-web-context-param
--name=javax.faces.STATE_SAVING_METHOD basic-ezcomp
Command unset-web-context-param executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help unset-web-context-param at the command line.