Refactor request application matching in servlet container