如何在IBM WebSphere Plugin Custom Properities的jacl脚本语言中获取变量值?

时间:2017-02-07 06:06:01

标签: websphere wsadmin jacl

我使用以下代码使用jacl脚本语言

从用户那里获取输入

set pname [gets stdin]
$AdminConfig create Property $pluginname {{validationExpression ""} {name $pname} {description ""} {value "30000"} {required "false"}}

我无法获得变量{name $pname}的值。我显示错误,因为属性名称无效..提前感谢

1 个答案:

答案 0 :(得分:0)

由于大括号会阻止替换,您可以这样做:

$AdminConfig create Property $pluginname [list {validationExpression ""} "name $pname" {description ""} {value "30000"} {required "false"}]

我认为更容易记住的模式是你会看到here

set attr_name           [list name $pName] 
set attr_value          [list value 30000] 
set attr_required       [list required false] 
set attr_description    [list description ""]

set attrs [list $attr_name $attr_value $attr_required $attr_description]

$AdminConfig create Property $pluginname $attrs