O'Reilly logo

Java Servlet & JSP Cookbook by Bruce W. Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.10. Using the weblogic.DeployerCommand-Line Tool

Problem

You want to use the command line to deploy a web application on WebLogic Server 7.0.

Solution

Use the Java-based weblogic.Deployer command-line utility, which is installed with WebLogic Server 7.0.

Discussion

For developers or administrators who need to use the command line or shell scripts for deploying and redeploying web applications, WebLogic Server 7.0 provides the Java-based Deployer utility. This utility accomplishes the same tasks as using the graphical interface of the WebLogic Administration Console to deploy or redeploy a web application. First, this recipe describes how to deploy and redeploy a web application on the command line using the Deployer utility. Then the recipe provides an example of a Windows batch file that invokes the Deployer utility.

Tip

The Deployer utility can initiate other tasks, such as redeploying individual web components in a web application. The online documentation for the Deployer utility can be found at http://e-docs.bea.com/wls/docs70/programming/deploying.html#1094693.

The Deployer utility is a Java-based program that requires the following JAR file on your classpath before the program can run: <BEA_HOME>\server\lib\weblogic.jar. represents the directory where WebLogic Server 7.0 was installed. The following command-line script on a Windows NT 4.0 machine redeploys the cookbook.war web application on a server named bwpserver:

java -cp k:\bea\weblogic700\server\lib\weblogic.jar; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required