New method to get the contextpath from a WebApplication.