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

Deploying Web Applications

When you deploy, undeploy, or redeploy a web application, you do not need to restart the server. Deployment is dynamic.

You can deploy a web application in the following ways, which are described briefly in these sections:

Using the Administration Interface

ProcedureTo deploy web applications using the administration interface

  1. In the Server Manager interface, click the Virtual Server Class tab.

    The Manage a Class of Virtual Servers page displays.

  2. Select a class of virtual servers, and then click Manage.

    The Class Manager interface displays.

  3. Select a virtual server, and then click Manage.

    The Virtual Server Manager interface displays.

  4. Click the Web Applications tab, and then click the Deploy Web Application link.

    The Deploy Web Application page displays.

  5. Enter the following information:

    • WAR File On. Select a Local Machine when uploading a WAR file to your server, or Server Machine when the WAR file already resides there.

      • WAR File Path. Enter the path on the local or server machine to the WAR file containing the web application. On server machines, enter the absolute path to the WAR file. On local machines, you can browse the available paths.

      • Application URI. Enter the URI on the virtual server for the web application.

      • Installation Directory. Enter the absolute path to the directory on the server machine from which the contents of the WAR file will be extracted. If the directory does not exist, a directory will be created.

  6. Click OK.

    For more information about using the Administration interface to manage Sun Java System Web Server, see the Sun Java System Web Server 6.1 SP7 Administrator’s Guide.

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 -

Using Sun Java Studio

Sun Java System Web Server 6.1 supports Sun Java Studio 5, Standard Edition. You can use Sun Java Studio to assemble and deploy web applications.

Sun Java Studio technology is Sun's powerful, extensible, integrated development environment (IDE) for Java technology developers. Sun Java Studio 8 is based on NetBeans™ software, and integrated with the Sun Java System platform. (Sun Java System Web Server 6.1 also supports NetBeans 3.5 and 3.5.1.)

Sun Java Studio support is available on all platforms supported by Sun Java System Web Server 6.1. You can obtain the plugin for the Web Server in the following ways:

Note –

The Sun Java Studio 5 plugin for Sun Java System Web Server 6.1 works only with a local Web Server (that is, with the IDE and the Web Server on the same machine).

For information about using the web application features in Sun Java Studio 8, explore the resources at

The behavior of the Sun Java Studio 8 plugin for Sun Java System Web Server 6.1 is the same as that for Sun™ Java System Application Server 7. If you are using the "Web Application Tutorial" at the web site listed above, for instance, you would set the Sun Java System Web Server 6.1 instance as the default, and then take the same actions described in the tutorial.

For more information about Sun Java Studio 8, visit

Note –

For information about using Sun Java Studio to debug web applications, see Using Sun Java Studio for Debugging in this guide.