Servlet refactoring