You want to deploy a web application using WebLogic's Administration Console.
Bring up the Administration Console in your web browser and use its graphical interface to deploy either a WAR file or a web-application directory.
The WebLogic Administration Console is a servlet- and browser-based tool for managing WebLogic server resources and Java 2 Enterprise Edition (J2EE) applications. To use the Console, WebLogic Server must be running. First, request the URL http://localhost:7001/console (or whichever your server address and port is, as in http://<weblogic-server-address>:<port>/console ). Then enter your login name and password to gain entry to the browser-based tool. The resulting screen looks like Figure 2-6, with a hierarchical list of choices in the lefthand column and the current screen choice in the righthand column.
Figure 2-6. WebLogic Administration Console
In the left column, choose the name of your domain by clicking on the plus sign ( + ), which displays the domain's subnodes. The subnodes of the domain include Servers, Clusters, Machines, Network Channels, Deployments, Services, and Security. Then choose the "Deployments" node, which gives you the choice of selecting its "Web Applications" subnode. Open up the "Web Applications" node by clicking on its plus sign. The resulting screen looks like Figure 2-7.
Figure 2-7. Web Applications node
In the Web Applications window, click the "Configure a New Web Application . . . " hyperlink. The next screen gives you the option of uploading the Web Application Archive (WAR) or Enterprise Application Archive (EAR) file through your browser to the server's filesystem, as shown in Figure 2-8.
Figure 2-8. Deploying a web application as a WAR or EAR file
Initiate this upload and then click on the "select" link next to the WAR file. Complete the three steps that Figure Figure 2-9 shows: click the arrow buttons to deploy the application from the "Available Servers" column to the "Target Servers" column, name the application (leave the name the same as the WAR filename minus the .war suffix), then press the "Configure and Deploy" button. That is all it takes to deploy the WAR file to the target server.
Figure 2-9. Final steps for deploying the WAR file
Now test the deployment by requesting one of the servlets in the browser, using the name that you gave the application as the context path . An example URL is http://localhost:7001/cookbook/cookieservlet . This URL requests a servlet that has been mapped to the name "/cookieservlet." The web-application context path is /cookbook .
Redeploying a previously undeployed web application using the WebLogic Administration Console involves the following steps:
Figure 2-10. Selecting a web application in the Console
If you want to delete a web application using the WebLogic Administration Console, click on the name of your domain in the lefthand column of the Console screen, then on the "Deployments" and "Web Applications" nodes. Clicking the trash can icon associated with the application, as shown in Figure 2-11, deletes the application from the WebLogic server.
Figure 2-11. Deleting a web application
Deleting a web application in this manner means that the application is no longer available to receive requests in the WebLogic web container.
Recipe 2.3 and Recipe 2.7; Recipe 2.9 and Recipe 2.10; WebLogic's Server 7.0 programmer documentation: http://e-docs.bea.com/wls/docs70/programming.html.