Dynamic caching with scripting

 

Overview

To see a list of parameters associated with dynamic caching, use the attributes command. For example

$AdminConfig attributes DynamicCache
Perform the following steps to enable servlet caching:

 

Procedure

  1. Start wsadmin

  2. Locate the server object. The following example selects the first server found:

    Jacl:

    set s1 [$AdminConfig getid /Server:server1/]
    

    Jython:

    s1 = AdminConfig.getid('/Server:server1/')
    
    

  3. List the web containers and assign them to the wc variable, for example:

    Jacl:

    set wc [$AdminConfig list WebContainer $s1]
    

    Jython:

    wc = AdminConfig.list('WebContainer', s1)
    

  4. Set the enableServletCaching attribute to true and assign it to the serEnable variable, for example:

    Jacl:

    set serEnable "{enableServletCaching true}"
    

    Jython:

    serEnable = [['enableServletCaching', 'true']]
    

  5. Enable caching, for example:

    Jacl:

    $AdminConfig modify $wc $serEnable
    

    Jython:

    AdminConfig.modify(wc, serEnable)
    


 

See Also


AdminConfig object for scripted administration

 

Related Tasks


Using scripting (wsadmin)
Getting started with scripting

 

See Also


Commands for the AdminConfig object