Refactoring on Servlet and Controller to share common code