LPS-39175 Properly detect portal servlet context name