WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Dynamic caching with scripting

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

Why and when to perform this task

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:

Steps for this task

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

    Using Jacl:

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

    Using Jython:

    s1 = AdminConfig.getid('/Server:server1/')
    
  2. List the web containers and assign them to the wc variable, for example:

    Using Jacl:

    set wc [$AdminConfig list WebContainer $s1]

    Using Jython:

    wc = AdminConfig.list('WebContainer', s1)
  3. Set the enableServletCaching attribute to true and assign it to the serEnable variable, for example:

    Using Jacl:

    set serEnable "{enableServletCaching true}"

    Using Jython:

    serEnable = [['enableServletCaching', 'true']]
  4. Enable caching, for example:

    Using Jacl:

    $AdminConfig modify $wc $serEnable

    Using Jython:

    AdminConfig.modify(wc, serEnable)



Related concepts
AdminConfig object for scripted administration

Related tasks
Using scripting (wsadmin)
Getting started with scripting

Related reference
Commands for the AdminConfig object

Task topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_caching.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)