Sun Java System Web Server 6.1 SP11 Administrator's Guide

Using the Command Line Interface

Before you can deploy a web application manually, you must make sure that the server_root/bin/https/httpsadmin/bin directory is in your path and that the IWS_SERVER_HOME environment variable is set to your server_root directory.

To deploy a virtual server web application:

You can use the wdeploy utility at the command line to deploy a WAR file into a virtual server web application environment:

wdeploy deploy -u <uri_path> -i <instance> -v 
<vs_id> [ [-V <verboseLevel>]| [-q] ] [-n] [-d <directory>]

To delete a virtual server web application:

wdeploy delete -u <uri_path> -i <instance> -v 
<vs_id> [ [-V <verboseLevel>] | [-q] ] [-n] hard|soft

To list the web application URIs and directories for a virtual server:

wdeploy list -i <instance> -v <vs_id> [ [-V <verboseLevel>] | [ -q] ]

The command parameters have the following meanings:


The URI prefix for the web application. 


The server instance name. 


The virtual server ID. 


(optional) The directory to which the application is deployed, or from which the application is deleted. If not specified for deployment, the application is deployed to the document root directory. 

hard | soft

Specifies whether the directory and the server.xml entry are deleted (hard) or just the server.xml entry is deleted (soft).


The WAR file name 


The verbose level to display the log messages on console. The value can range from 0 to 4. The default value is 1. 

Note that in Sun Java System web Server 6.1, the loglevel attribute of the LOG element in server.xml is used in lieu of this element.


(quiet) Sets the verbose level to zero. It is equivalent to the setting -V 0.


prevents wdeploy from automatically sending the reconfigure command to the web server. For more information, see Using -n in the wdeploy Command.

Caution – Caution –

If you deploy a web application and do not specify a directory, the application is deployed to the document root directory. If you then delete the application using the hard parameter, the document root directory will be deleted.

When you execute the wdeploy deploy command, three things happen:

For example:

wdeploy deploy -u /hello -i -v 
-d /s1ws61/ 

This utility results in the following server.xml entry:

    <WEBAPP uri="/hello"

The /s1ws61/ directory has the following contents:


Using -n in the wdeploy Command

In Sun Java System Web Server 6.1, after deploying or deleting a web application, wdeploy dynamically reconfigures the server, causing the server to load or unload the web application that was deployed or deleted. Previously, you had to explicitly reconfigure the server in order for your changes to take effect by doing one of the following:

Now a successful wdeploy command will automatically be enabled to service requests for a new web application, or to stop servicing requests for a deleted web application.

The -n option prevents wdeploy from automatically sending the reconfigure command to the web server. Use the -n option in your command when deploying or undeploying multiple web applications (in a script for example), and you want to reconfigure the server only once after the last web application is deployed.

Accessing Deployed Web Applications

After you have deployed an application, you can access it from a browser as follows:


The parts of the URL have the following meanings:


One of the urlhosts values for the virtual server.


(optional) Only needed if the virtual server uses a non-default port. 


The same one you used to deploy the application. This is also the context path. 


(optional) The page in the application that end users are meant to access first. 

For example:


Return Values

The wdeploy option returns following exit values: