def deploy():

  for i in range(1,int(MWCount)+1) :
    try:
                
      loc=properties.get(“MWloc”)
                                                
      appN=properties.get(“MWname.”+ str(i))

      location=loc+’/’+appN
                                                                
      #server = properties.get(“serverName”)
                                    
      filePath1 = location
                                                
      contextRoot = properties.get(“Mwcontextroot.”+ str(i))
                                                
      print ‘final path’, filePath1
             
      AdminApp.install(filePath1,[‘-appname’, appN])
                                                
      AdminApp.edit(appN, [‘-CtxRootForWebMod’, [[“.*”,”.*”,contextRoot]]])

      AdminConfig.save()  
            
      #AdminConfig.save()  
                                
    except:
      print ‘DEPLOYMENT FAILED’
  return
                
deploy()

Related Posts

Python Scripts to Create J2C Authentication Data in Websphere Application Server

Python Scripts to Create JDBC Provider in Websphere Application Server