Refactor for new servlet container version