Weblogic 10.3.5: Steps for Using WLST
Setting Up Your Environment
To set up your environment for WLST:
- Install and configure the WebLogic Server software.
- Add WebLogic Server classes to the
CLASSPATH
environment variable and WL_HOME
\server\bin
to the PATH
environment variable, where WL_HOME
refers to the top-level installation directory for WebLogic Server.
- You can use a
WL_HOME
\server\bin\setWLSEnv
script to set both variables. On Windows, a shortcut on the Start menu sets the environment variables and invokes WLST (Tools
WebLogic Scripting Tool).
Invoking WLST
- If you will be connecting to a WebLogic Server instance through an SSL listen port on a server that is using the demonstration SSL keys and certificates, invoke WLST using the following command:
java -Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=DemoTrust weblogic.WLST
Otherwise, at a command prompt, enter one of the following commands:
-
java weblogic.WLST
-
java weblogic.WLST -loadProperties propertyFilename
Running WLST from Ant
The
wlst
Ant task is predefined in the version of Ant shipped with WebLogic Server and enables you to run WLST scripts from within your Ant build file.
Note: | If you want to use the task with your own Ant installation, add the following task definition in your build file: |
Note: | <taskdef name="wlst" classname="weblogic.ant.taskdefs.management.WLSTTask" /> |
To run WLST from an Ant script:
- Set your environment in a command shell.
- On Windows NT, execute the
setWLSEnv.cmd
command, located in the directory WL_HOME
\server\bin
, where WL_HOME
is the top-level directory of your WebLogic Server installation.
- On UNIX, execute the
setWLSEnv.sh
command, located in the directory WL_HOME
/server/bin
, where WL_HOME
is the top-level directory of your WebLogic Server installation.
- Add a call to the
wlst
Ant task to execute WLST commands. For example: