使用 wsadmin 脚本编制来配置新的 URL
可以使用脚本编制和 wsadmin 工具来配置新的 URL。
开始之前
关于此任务
执行以下示例配置新的 URL:
过程
- 识别父标识并将其指定给 newurlp 变量。
使用 Jacl:
set newurlp [$AdminConfig getid /Cell:mycell/Node:mynode/URLProvider:URLP1/]
使用 Jython:
newurlp = AdminConfig.getid('/Cell:mycell/Node:mynode/URLProvider:URLP1/') print newurlp
示例输出:URLP1(cells/mycell/nodes/mynode|resources.xml#URLProvider_1)
- 标识必需属性:
使用 Jacl:
$AdminConfig required URL
使用 Jython:
print AdminConfig.required('URL')
示例输出:Attribute Type name Stringspec String
- 设置必需的属性:
使用 Jacl:
set name [list name URL1] set spec [list spec "Put the spec here"] set urlAttrs [list $name $spec]
示例输出:{name URL1} {spec {Put the spec here}}
使用 Jython:
name = ['name', 'URL1'] spec = ['spec', "Put the spec here"] urlAttrs = [name, spec]
示例输出:[[name, URL1], [spec, "Put the spec here"]]
- 创建 URL:
使用 Jacl:
$AdminConfig create URL $newurlp $urlAttrs
使用 Jython:
print AdminConfig.create('URL', newurlp, urlAttrs)
示例输出:URL1(cells/mycell/nodes/mynode|resources.xml#URL_1)
- 保存配置更改。有关更多信息,请参阅有关使用 wsadmin 工具来保存配置更改的文档。
- 仅在 Network Deployment 环境中使节点同步。请参阅“使用 wsadmin 工具同步节点”主题,以了解更多信息。
相关任务:


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_url
文件名:txml_url.html