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