To use NetBeans IDE:
Ensure the Sun Java System Application Server is running.
In the Runtime window, expand the Sun Java System Application Server instance and the node containing the application or module.
Right-click the application or module and choose Undeploy.
To use the Admin Console:
Open the URL http://localhost:4848/asadmin in a browser.
Expand the Applications node.
Select Web Applications.
Click the check box next to the module you wish to undeploy.
Click the Undeploy button.
Use the asadmin command as follows:
asadmin undeploy context-root
To use the Ant tool, execute the following command in the directory where you built and packaged the WAR: