<#list webApps as webapp> <#-- Remove last directory segment from path, Weblogic is expecting the parent directory --> <#if webapp.getLocation().lastIndexOf("/") != -1> <#assign lastSlash = webapp.getLocation().lastIndexOf("/")> <#if (webapp.getLocation().lastIndexOf("\\") > lastSlash)> <#assign lastSlash = webapp.getLocation().lastIndexOf("\\")>