1
votes

I am trying to include a variable in my jython script to hold my nodename, but I end up getting BSFEXception. My script is this :

node=AdminControl.getNode()
AdminTask.installBusinessSpaceWidgets('[-nodeName %node% -serverName server1 -widgets C:/package/widgets/Widgets.zip]')

While I could do this with jacl, I couldn't find a way to do it in jython - which is what most of my scripts are written in.

1

1 Answers

1
votes

The syntax is:

node=AdminControl.getNode()
AdminTask.installBusinessSpaceWidgets('[-nodeName %s -serverName server1 -widgets C:/package/widgets/Widgets.zip]' % node)

Using a real list can be more convenient sometimes:

node=AdminControl.getNode()
AdminTask.installBusinessSpaceWidgets(['-nodeName', node, '-serverName', 'server1', '-widgets', 'C:/package/widgets/Widgets.zip'])