Oracle GlassFish Server 3.1 Section 1: asadmin Utility Subcommands
create-connector-connection-pool(1)
create-connector-security-map(1)
create-connector-work-security-map(1)
create-jdbc-connection-pool(1)
create-message-security-provider(1)
create-resource-adapter-config(1)
delete-connector-connection-pool(1)
delete-connector-security-map(1)
delete-connector-work-security-map(1)
delete-jdbc-connection-pool(1)
delete-message-security-provider(1)
delete-resource-adapter-config(1)
disable-http-lb-application(1)
disable-secure-admin-internal-user(1)
disable-secure-admin-principal(1)
enable-secure-admin-internal-user(1)
enable-secure-admin-principal(1)
list-connector-connection-pools(1)
list-connector-security-maps(1)
list-connector-work-security-maps(1)
list-message-security-providers(1)
list-resource-adapter-configs(1)
list-secure-admin-internal-users(1)
list-secure-admin-principals(1)
list-supported-cipher-suites(1)
unfreeze-transaction-service(1)
update-admin-server-coordinates(1)
update-admin-server-local-coordinates(1)
update-connector-security-map(1)
update-connector-work-security-map(1)
Oracle GlassFish Server 3.1 Section 1M: Utility Commands
Oracle GlassFish Server 3.1 Section 5ASC: GlassFish Server Concepts
- sets an environment entry for a deployed web application or module
set-web-env-entry [--help] --name=env-entry-name --type=env-entry-type {--value=value|--ignoredescriptoritem={true|false}} [--description=description] application-name[/module]
The set-web-env-entry subcommand sets an environment entry for one of the following items:
A deployed web application
A web module in a deployed Java Platform, Enterprise Edition (Java EE) application
The application must already be deployed. Otherwise, an error occurs.
An application uses the values of environment entries to customize its behavior or presentation.
This subcommand enables you to change the configuration of a deployed application without the need to modify the application's deployment descriptors and repackage and redeploy the application.
This subcommand is supported in remote mode only.
Displays the help text for the subcommand.
The name of the environment entry that is to be set. The name is a JNDI name relative to the java:comp/env context. The name must be unique within a deployment component.
The fully-qualified Java type of the environment entry value that is expected by the application's code. This type must be one of the following Java types:
java.lang.Boolean
java.lang.Byte
java.lang.Character
java.lang.Double
java.lang.Float
java.lang.Integer
java.lang.Long
java.lang.Short
java.lang.String
The value to which the environment entry is to be set. If the --type is java.lang.Character, the value must be a single character. Otherwise, the value must be a string that is valid for the constructor of the specified type.
Either the --value option or the --ignoredescriptoritem option must be set.
Specifies whether the environment entry is ignored if it is set in the application's deployment descriptor. When an environment entry is ignored, the application behaves as if the entry had never been set in the application's deployment descriptor. The behavior of an application in this situation depends on the application.
The possible values are as follows:
The value is not ignored (default).
The value is ignored.
Either the --value option or the --ignoredescriptoritem option must be set.
Note - Do not use the --ignoredescriptoritem option to unset an environment entry that has previously been set by using the set-web-env-entry subcommand. Instead, use the unset-web-env-entry(1) subcommand for this purpose.
An optional textual description of the environment entry that is being set.
The name of the application. This name can be obtained from the Administration Console or by using the list-applications(1) subcommand.
The application must already be deployed. Otherwise, an error occurs.
The relative path to the module within the application's enterprise archive (EAR) file. The path to the module is specified in the module element of the application's application.xml file.
module is required only if the environment entry applies to a web module of a Java EE application. If specified, module must follow application-name, separated by a slash (/).
For example, the application.xml file for the myApp application might specify the following web module:
<module> <web> <web-uri>myWebModule.war</web-uri> </web> </module>
The module would be specified as the operand of this command as myApp/myWebModule.war.
Example 1 Setting an Environment Entry for a Web Application
This example sets the environment entry Hello User of the application hello to techscribe. The Java type of this entry is java.lang.String.
asadmin> set-web-env-entry --name="Hello User" --type=java.lang.String --value=techscribe --description="User authentication for Hello appplication" hello Command set-web-env-entry executed successfully.
Example 2 Ignoring an Environment Entry That Is Defined in a Deployment Descriptor
This example ignores the environment entry Hello Port of the web application hello.
asadmin> set-web-env-entry --name="Hello Port" --type=java.lang.Integer --ignoredescriptoritem=true hello Command set-web-env-entry executed successfully.
command executed successfully
error in executing the command
list-applications(1), list-web-env-entry(1), unset-web-env-entry(1)