Use the Jython or Jacl scripting language to implement pattern matching when installing, updating, or editing an application. Pattern matching simplifies the task of supplying required values for certain complex options by allowing you to pass in asterisk (*) to all of the required values that cannot be edited. Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
The following example uses pattern matching to install an application with the MapModulesToServers option:
$AdminApp install DefaultApplication.ear {-appname TEST -MapModulesToServers {{.* .* WebSphere:cell=myCell,node=myNode,server=myServer}}}
AdminApp.install('DefaultApplication.ear', ['-appname', 'TEST', '-MapModulesToServers', [['.*', '.*', 'WebSphere:cell=myCell,node=myNode,server=myServer']]])
$AdminApp install DefaultApplication.ear {-appname TEST -MapModulesToServers {{.* .*.war,.* WebSphere:cell=myCell,node=myNode,server=myServer} {.* .*.jar,.* WebSphere:cell=myCell,node=yourNode,server=yourServer}}}
AdminApp.install('DefaultApplication.ear', ['-appname', 'TEST', '-MapModulesToServers', [['.*', '.*.war,.*', 'WebSphere:cell=myCell, node=myNode,server=myServer'], ['.*', '.*.jar,.*', 'WebSphere:cell=myCell,node=yourNode,server=yourServer']]])