Manage applications with scripting

Overview

Application management scripts use the AdminApp object to manage applications in the appserver configuration. You can use the AdminApp object to install and uninstall applications, list installed applications, edit application configurations and obtain help. It is important to save application configuration changes because the application configuration information is part of the server configuration.

  1. Decide how you want to execute the script. If you want to run the script immediately from the command line, enter it surrounded by quotes as a parameter to the wsadmin -c command. To save the script for repeated use, compose it in a file and execute it with the wsadmin -f command. If you want to compose and run the script interactively, issue the wsadmin command without the -c or -f flags. For more information about executing scripts, see Launching scripting clients.

  2. Write an AdminApp script command statement to perform a task, for example:

    Using Jacl:

    $AdminApp command

    [V5.1 and later]Using Jython:

    AdminApp.command()

  3. Save the configuration changes with the following command:

    Using Jacl:

    $AdminConfig save

    [V5.1 and later]Using Jython:

    AdminConfig.save()

    Use the reset command of the AdminConfig object to undo changes that you made to your workspace since your last save.


Related concepts
Jacl
Related reference
Application management examples with wsadmin
AdminApp object for scripted administration