Sun Java System Web Server 6.1 SP7 Programmer's Guide to Web Applications

Deploying a Web Application using wdeploy

Before you can deploy a web application manually, you must make sure that the server_root/bin/https/bin directory is in your path.

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

wdeploy deploy -u uri_path -i instance -v vs_id [-d directory] war_file

You can also delete a virtual server web application:

wdeploy delete -u uri_path -i instance -v vs_id hard|soft

You can also list the web application URIs and directories for a virtual server:

wdeploy list -i instance -v vs_id

The following table describes the command parameters. The left column lists the parameter, and the right column describes the parameter.

Table 6–1 command Parameters




The URI prefix for the web application (requires a leading “/”). 


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 instance_directory/webapps/vs_id/webappname. For example:



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


The WAR file name. 

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

Example usage of the command is as follows:

wdeploy deploy -u /hello -i -v

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


The following table describes the parts of the URL. The left column lists the part, and the right column describes what the part means.

Table 6–2 Parts of the URL




One of the urlhosts values for the virtual server.


(optional) Only needed if the virtual server uses a nondefault 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:

- or -