I tried using this this conversion utility to convert Hello World jacl script to jython by following these steps
- Create test.jacl script like this
puts "Hello world" - Then go to <applicationservertoolkitroot>/bin folder and execute
Jacl2Jython.bat c:\temp\test.jacl
to convert my test.jacl into jython file - The conversion utility creates a .py file in the same directory as that of the .jacl script, in my case it created test.py file like this
import sys
def wsadminToList(inStr):
outList=[]
if (len(inStr)>0 and inStr[0]=='[' and inStr[-1]==']'):
tmpList = inStr[1:-1].split(" ")
else:
tmpList = inStr.split("\n") #splits for Windows or Linux
for item in tmpList:
item = item.rstrip(); #removes any Windows "\r"
if (len(item)>0):
outList.append(item)
return outList
#endDef
print "Hello world"
If you search for wsadmin script samples on google most of the examples that you will find are developed using the JACL syntax so this utility comes in handy to convert those samples into jython
Hi Sunil,
ReplyDeleteI am unable to avoid the stale connection WID 7 so could you please explain me how to do that one.
Thanks in advance.
Hi Sunil,
ReplyDeleteI am unable to avoid the stale connection WID 7 so could you please explain me how to do that one.