WebLogic Scripting Tool command line editing

1

When you’re a newbee to WebLogic, and in this case especially the WebLogic Scripting Tool (WLST) it’s a good thing to explore the capabilities of the WLST by browsing and navigating through the MBean stucture. With the use of easeSyntax() navigating makes it easier to navigate, because you can browse in a UNIX/Linux like way.

Another thing is, In a UNIX/Linux  environment, WLST does not provide any command line editing capabilities. However, you can use a 3rd party tool like JLine to provide line editing in WLST.

JLine provides the following editing capabilities:

  • Command history
  • Line editing
  • Custom key bindings

For more information about JLine refer to http://jline.sourceforge.net/index.html

To use JLIne with WLST, follow these steps.

Download JLine from http://jline.sourceforge.net/downloads.html
Unzip the file and put the jline jar  into a directory on your machine. Add the jline jar to the server’s CLASSPATH

Run JLine as follows

java jline.ConsoleRunner weblogic.WLST

Alternatively, you can edit the $WL_HOME/common/bin/wlst.sh and then add jline.ConsoleRunner before weblogic.WLST

(where $WL_HOME is the WebLogic Server home – like  /app/oracle/Middleware/wlserver_10.3)

The default keys in JLine are:

  • UP ARROW and DOWN ARROW to move within the command history
  • CTRL-N and CTRL-P to move within the command history
  • LEFT ARROW and RIGHT ARROW to move within a command
  • CTRL-B moves to the previous character
  • CTRL-G moves to the previous word
  • CTRL-A moves to the beginning of the line
  • CTRL-F moves to the next character
  • CTRL-E moves to the end of the line
  • CTRL-U deletes all characters before the cursor
  • CTRL-W deletes the word before the cursor

On UNIX systems JLine will execute the stty command to initialize the terminal to allow unbuffered input, using the jline.UnixTerminal class.

Share.

About Author

Started in pharmacy, I made the change to IT in 1996. I am an Oracle Fusion Middleware Architect at AMIS, with focus on technical infrastructure, Serverside solutions, installing, administering, configuring the Oracle Fusion Middleware stack. My experience is from integrations at telco´s using Oracle AIA, Oracle Portal, OID, Forms&Reports, Discoverer upto the latest Oracle WebLogic 11g releases with practically all Oracle products running on top of it

1 Comment

Leave a Reply