Copying the WAR into the domain-dir/autodeploy/ directory.
Using the Admin Console.
By running asadmin or ant to deploy the WAR.
Using NetBeans IDE.
All these methods are described briefly in this chapter; however, throughout the tutorial, you will use ant and NetBeans IDE for packaging and deploying.
In a packaged web module for deployment on the Application Server, the context root is stored in sun-web.xml.
To edit the context root, do the following:
Expand your project tree in the Projects pane of NetBeans IDE.
Expand the Web Pages and WEB-INF nodes of your project.
In the editor pane, click Edit As XML.
Edit the context root, which is enclosed by the context-root element.
If you have deployed the hello1 application, before proceeding with this section, undeploy the application by following one of the procedures described in Undeploying Web Modules.
Expand the Applications node.
Select the Web Applications node.
Click the Deploy button.
Select the radio button labeled “Package file to be uploaded to the Application Server.”
Type the full path to the WAR file (or click on Browse to find it), and then click the OK button.
Type the application name.
Type the context root.
Select the Enabled box.
Click the Finish button.
asadmin deploy full-path-to-war-file
To deploy a WAR with the Ant tool, open a terminal window or command prompt in the directory where you built and packaged the WAR, and execute
To deploy a WAR with NetBeans IDE, do the following:
Select File->Open Project.
In the Open Project dialog, navigate to your project and open it.
In the Projects tab, right-click the project and select Undeploy and Deploy.