Takes the tomcat context into consideration