It is based on the Java scripting interpreter, Jython.
In addition to supporting standard Jython features such as local variables, conditional variables, and flow control statements, WLST provides a set of scripting functions (commands) that are specific to WebLogic Server.
You can use WLST as the command-line equivalent to the WebLogic Server Administration Console (WLST online) or as the command-line equivalent to the Configuration Wizard (WLST offline)
You can use WLST to connect to a running Administration Server and manage the configuration of an active domain, view performance data about resources in the domain, or manage security data (such as
adding or removing users).
Without connecting to a running WebLogic Server instance, you can use WLST to create domain templates, create a new domain based on existing templates, or extend an existing, inactive domain. You cannot use WLST offline to view performance data about resources in a domain or modify security data (such as adding or removing users).
In embedded mode, you instantiate the WLST interpreter in your Java code and use it to run WLST commands and scripts
Run setDomainEnv.sh under <Domain>/bin directory.
To use WLST in interactive mode:
To connect to a WebLogic Server instance after you start WLST in interactive mode:
To use WLST in script mode:
java weblogic.WLST c:\myscripts\myscript.py
exit()Exiting WebLogic Scripting Tool ...
- Command names and arguments are case sensitive.
- Enclose arguments in single or double quotes. For example,
- If you specify a backslash character (
\) in a string, either precede the backslash with another backslash or precede the entire string with a lower-case
rcharacter. The \ or
rprevents Jython from interpreting the backslash as a special character.
- When using WLST offline, the following characters are not valid in names of management objects: period (
.), forward slash (
/), or backward slash (
\).If you need to
cdto a management object whose name includes a forward slash (
/), surround the object name in parentheses. For example:
Start Node Managerif Node Manager is not already running, you can log on to the host computer and use WLST to start it:Connect WLST to a Node Manager by entering the nmConnect command.nmConnect('weblogic', 'weblogic', 'localhost', '5556', 'mydomain','c:/bea/user_projects/domains/mydomain','ssl')Use the nmStart command to start a server.wls:/nm/mydomain>nmStart('AdminServer') starting server AdminServer ... Server AdminServer started successfully wls:/nm/mydomain>Monitor the status of the Administration Server by entering the nmServerStatus command.Stop the server by entering the nmKill command.wls:/nm/mydomain>nmKill('serverName')Killing server AdminServer Server AdminServer killed successfully wls:/nm/mydomain>To start a Managed Server, enter the following command:where managedServerName is the name of the server.For example,
start('managed1','Server')start('clusterName', 'Cluster')For example: