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|
Parameter |
Description |
|---|---|
|
uri_path |
The URI prefix for the web application (requires a leading “/”). |
|
instance |
The server instance name. |
|
vs_id |
The virtual server ID. |
|
directory |
(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: /opt/SUNWwbsvr/https-test/webapps/https-test/testapp |
|
hard|soft |
Specifies whether the directory and the server.xml entry are deleted (hard), or just the server.xml entry (soft). |
|
war_file |
The WAR file name. |
When you execute the wdeploy deploy command, two things happen:
A web application with the given uri_path and directory gets added to the server.xml file.
The WAR file gets extracted at the target directory.
Example usage of the command is as follows:
wdeploy deploy -u /hello -i server.sun.com -v acme.com <server_root>/plugins/java/sample/webapps/simple/webapps-simple.war
After you have deployed an application, you can access it from a browser as follows:
http://vs_urlhost[:vs_port]/uri_path/[index_page]
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|
Part |
Description |
|---|---|
|
vs_urlhost |
One of the urlhosts values for the virtual server. |
|
vs_port |
(optional) Only needed if the virtual server uses a nondefault port. |
|
uri_path |
The same one you used to deploy the application. This is also the context path. |
|
index_page |
(optional) The page in the application that end users are meant to access first. |
http://acme.com:80/hello/index.jsp
- or -
http://acme.com/hello/