[ Team LiB ] Previous Section Next Section

Recipe 2.9 Using WebLogic Builder to Deploy a Web Application


You want to use WebLogic Builder to deploy a web application.


WebLogic Builder installs with the WebLogic 7.0 Server, so you can launch the Builder application and use its graphical tools to deploy the web application.


WebLogic Builder is a graphical tool that installs with WebLogic Server 7. It can be used to edit deployment descriptor files such as web.xml and weblogic.xml, as well as for deploying web applications to a server. Using WebLogic Builder, you can open up, edit, and deploy web applications that exist as either WAR files or in exploded directory format.

Exploded directory format is a web-application directory structure as it would appear in your filesystem, but that is not in archived or in WAR form. To be deployed on WebLogic as a web application, the root directory must contain the WEB-INF/web.xml deployment descriptor and any other properly structured application components, such as a the WEB-INF/classes directory containing your servlets (including any package-related directories).

You can launch WebLogic Builder on Windows from either the "Start" menu or the command line. The start script for Builder is at: <BEA_HOME>/weblogic700/server/bin/startWLBuilder.cmd (or startWLBuilder.sh on Unix). <BEA_HOME> is the directory where WebLogic Server 7.0 is installed.

It is easy to open up and edit the deployment descriptor for a web application in WebLogic Builder. Go to the File Open menu and navigate to the WAR file or root directory for the application.

The result is the window depicted in Figure 2-12. The navigation tree in the upper-left window lets you configure web resources (such as servlets) and deployment descriptor elements (such as security constraints), then save the changes to web.xml.

Figure 2-12. Opening a WAR file in WebLogic Builder

You can add or delete elements for servlets, servlet mappings, and filters, for instance. The changes are persisted to the deployment descriptor if you make and save changes to the application from within WebLogic Builder. You can then optionally connect to the server from the "Tools" menu, and deploy the application.

The "Deploy Module" window indicates whether the application is already deployed. Figure 2-13 shows this window. If you have already deployed the application, you can still make deployment-descriptor changes in Builder, then deploy the application again from the "Tools" menu. WebLogic Builder specifically undeploys the application, then redeploys it with the changes that you included in web.xml.

Figure 2-13. WebLogic Builder's Deploy Module window

WebLogic Builder does not show any JSP files that may be part of the web application. It will show any servlet mappings that are associated with JSP files.

See Also

Recipe 2.3, Recipe 2.7, Recipe 2.8, and Recipe 2.10; WebLogic's Server 7.0 programmer documentation: http://e-docs.bea.com/wls/docs70/programming.html; the local WebLogic Builder Help documentation: <BEA_HOME>\weblogic700\server\builder\index.html.

    [ Team LiB ] Previous Section Next Section