This section describes the Command Line Interface for Sun Java System Web Server 7.0 and defines all the commands supported for configuring and administering the server.
Sun Java System Web Server 7.0 introduces a new CLI called as wadm.
The earlier version of the server supported a few discrete command lines,
which together addressed only a subset of whole administration functionality
provided in GUI. Command line interfaces supported in Sun Java System Web
Server 6.1 were
flexanlg. The new CLI (wadm) features:
Embedded JACL shell for scripting.
Extensible CLI — more commands can be added to the CLI by third party plug-ins.
Sun Java System Web Server 7.0 does not support
wdeploy is supported in Sun Java System Web Server 7.0 only for backward compatibility with 6.x versions and will work only on the Administration Server node.
wadm supports invocation in 3 different modes.
Standalone mode —
In this mode, you invoke
wadm from a command shell,
specifying the desired command, options and operands. When the command finishes
execution, CLI exits back to the shell. This mode can support both interactive
and non-interactive execution of commands. Interactive execution, which is
the default, will prompt for the password if password is not already specified
in the password file (passed through the --password-file option).
Non-interactive execution will result in an error if
--password-file option is not specified. For example,
wadm> create-config --user=admin --password-file=./admin.pwd --http-port=2222 --server-name=syrinx myconfig
Shell Mode — In this
mode, you invoke
wadm from a command shell with no
wadm prompts the user for a command. After
the command is executed, it will return back to the shell. This shell can
be exited by typing exit or quit command. Interactive and non-interactive
executions are applicable to this mode. For example,
wadm -user=admin -host=serverhost --password-file=admin.pwd --port=8989
File Mode — In this
mode, you can add a list of commands in a file and pass the file as an argument
wadm. For example,
wadm -user=admin -host=serverhost --password-file=admin.pwd --port=8989 -commands-file=/space/scripts/admscr
The figure below depicts the syntax for invoking wadm commands.
With the wadm CLI, you can perform all of tasks that you can do with the Administration Console.
Where can I find the CLI for Sun Java System Web Server 7.0 administration?Answer:
The administration CLI is located at
install-root/bin/wadm. To use the CLI, you need to know:
Administration server hostname (default is
SSL port for the administration server (default is 8989).
Administration server user name (default is
Administration server password.
Administration server needs to be running in order to use the
CLI. You can start the server by running
wadm will use username and password of the administrator to authenticate to Administration Server. A valid username and password file must be passed as arguments to each command running in single mode. Shell mode accepts username and password file when wadm executable is invoked. Commands invoked in the shell mode do not require the connection options (for example, user, password-file, host, port and ssl). If specified, they will be ignored.
Some commands supported by the CLI require password inputs. For example, bindpw, user-password and token-pin. User can specify these passwords in the same file that contains the administration user password. If the password-file is not specified with the command, then user will be prompted for the password.
The wadm communicates with the Administration Server through SSL, if SSL is enabled on Administration Server. The Certificate passed by the Administration Server will be verified against the truststore (~/.wadmtruststore). If the certificate exists and is valid, the command proceeds normally. Otherwise, wadm displays the certificate and gives the user the choice of accepting it. If the user accepts it, the certificate will be added to the truststore and the command proceeds normally.
truststore need not be password protected since it does not contain any sensitive data.