@@ -0,0 +1,1239 @@
+package com.google.sps.servlets;%0A%0Aimport com.google.appengine.api.users.User;%0Aimport com.google.appengine.api.users.UserServiceFactory;%0Aimport com.google.sps.data.Event;%0Aimport com.google.sps.utilities.CommonUtils;%0Aimport com.google.sps.utilities.EventRanker;%0Aimport com.google.sps.utilities.SpannerTasks;%0Aimport java.io.IOException;%0Aimport java.util.List;%0Aimport java.util.Set;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A@WebServlet(%22/event-ranker%22)%0Apublic class EventRankerServlet extends HttpServlet %7B%0A  /** Returns events in order of relevance */%0A  @Override%0A  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException %7B%0A    User user = UserServiceFactory.getUserService().getCurrentUser();%0A    // TODO: Replace getAllEvents() with the appropriate method to get all results to display%0A    Set%3CEvent%3E relevantEvents = SpannerTasks.getAllEvents();%0A    List%3CEvent%3E rankedRelevantEvents = EventRanker.rankEvents(relevantEvents);%0A    response.setContentType(%22application/json;%22);%0A    response.getWriter().println(CommonUtils.convertToJson(rankedRelevantEvents));%0A  %7D%0A%7D%0A

Add servlet for event ranker