Proactive insights, news and tips from Oracle Fusion Middleware Support. Learn Oracle from Oracle.

My Take on Getting Started With WebLogic Scripting Tool (WLST)


WebLogic Scripting Tool (WLST) has been a long established favourite for experienced WebLogic Server administrators. Over the past two / three weeks I have spent time getting to know WLST - and by getting to know I mean developing a script to produce a solution rather than randomly running three or four commands :-). For the final result of my efforts, see my previous blog entry

Get an Offline or Online WebLogic Domain Summary Using WLST! 

This is a short summary of the resources I used. 

Initial reading and understanding

If you are never encountered WLST, spend a few minutes reading:

Oracle Fusion Middleware Administrator's Guide 11g Release 1 (11.1.1)
3.5.1 Getting Started Using the Oracle WebLogic Scripting Tool (WLST)

Oracle Fusion Middleware WebLogic Scripting Tool Command Reference 11g
Overview of WLST Command Categories

Unsurprisingly, you will also find yourself using the Command Reference as a look up for available commands, functionality and syntax.

WLST Code Snippets and Examples

(There are many more WLST postings (questions, examples, discussions) to be found on the web.)


WLST is based on the Java scripting interpreter, Jython and as such
supports standard Jython features such as local variables, conditional
variables, and flow-control statements. Therefore, to achieve something more interesting and exciting you must prepared to learn (by doing) a little Jython. Fortunately, the Jython documentation is comprehensive and provides some good examples:

Use an editor which recognizes Jython / Python

Jython (like it's "parent" language Python) is very sensitive to syntax errors. In particular, the language requires the use of indents when coding conditions

(e.g IF statements) and loops. Attempt to write Jython using a plain text editor, and before long stress levels will rise. You can make life easier by using an editor which recognizes Jython.

Editors like Oracle Eclipse ** and SCITE assist the developer by for example:

  • auto-formatting lines of code
  • color coding of syntax
  • providing option to show line numbers

** Eclipse requires the Python and Jython Interpreters to be configured. Instructions can be found here.

My Oracle Support Documents

And finally, if you have access to My Oracle Support, here are a few knowledge articles which provide some nice WLST examples:

  • How To Debug WLST Jython Scripts? [ID 1360744.1]
  • WLST sample script To Obtain Managed Server Status [ID 1373532.1]
  • WLST Script for monitoring and getting statistics of WebLogic JMS Destinations. [ID 1327086.1]
  • How to get JDBC and Connection Pool data from a WLST or shell script [ID 1453818.1]
  • How to Startup or Shutdown Multiple WebLogic Managed Servers With a WLST Script [ID 1383150.1]
  • How To Take Thread Dumps With WLST [ID 1274713.1]

Join the discussion

Comments ( 3 )
  • guest Friday, August 30, 2013


    I have question regarding Doc ID 1383150.1 (How to Startup or Shutdown Multiple WebLogic Managed Servers With a WLST Script).

    1) while stopping the specified managed server, the script is displaying the process of shutting down..... and finally, displays managed server has been shutdown.

    2) But, while using the script for starting managed server, its not displaying the status. It is simply says started managed server and script is ending.

    Is there anyway we could also know the stating status and to display the managed server has been started with out exiting the script.

    Thanks & regards,


  • Dan Mortimer Monday, September 2, 2013

    To the best of my knowledge, there is no WLST function which captures and prints out the different server state during the lifecycle of server startup / shutdown i.e

    Diagram of the Server Life Cycle


    Instead you have to code a loop which checks the server (e.g every 5 or 10 seconds) and print out the state.

    Here are some useful links which will hopefully allow you to code a solution which suits your requirements.

    Oracle Documentation Example:


    Middleware Magic Blog - Sending Email Alert for WebLogic Servers Current State


    WLST By Example Blog - Server State using WLST


  • Ram Friday, September 25, 2015

    Hi Team,

    I am working on weblogic deployment automation, i used jython to connect to Oracle DB and logic is in python. I would like to execute the script for all applications at a time. I suppose to use the threading concept in python, but i think wlst doesn't support multi threading concept.

    Please let me know is it supportable or is their any way without threading.

    I am facing the below error:

    Problem invoking WLST - Traceback (innermost last):

    File "/home/devadm/automation/prodDeployment.py", line 133, in ?

    File "/home/devadm/automation/prodDeployment.py", line 120, in main

    TypeError: can't set arbitrary attribute in java instance: target

    Thanking you,


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.

Recent Content