@@ -0,0 +1,1564 @@
+package com.google.sps.servlets;%0A%0Aimport com.google.sps.data.VolunteeringOpportunity;%0Aimport com.google.sps.utilities.CommonUtils;%0Aimport com.google.sps.utilities.DatabaseConstants;%0Aimport com.google.sps.utilities.DatabaseWrapper;%0Aimport java.io.IOException;%0Aimport java.util.Optional;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A/** Servlet to get volunteering opportunity given opportunityId */%0A@WebServlet(%22/volunteering-opportunity-data%22)%0Apublic class VolunteeringOpportunityDataServlet extends HttpServlet %7B%0A  private static final String OPPORTUNITY_ID = %22opportunity-id%22;%0A  private static final DatabaseWrapper databaseWrapper =%0A      new DatabaseWrapper(DatabaseConstants.INSTANCE_ID, DatabaseConstants.DATABASE_ID);%0A%0A  @Override%0A  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException %7B%0A    String opportunityId = request.getParameter(OPPORTUNITY_ID);%0A%0A    Optional%3CVolunteeringOpportunity%3E opportunity =%0A        databaseWrapper.getVolunteeringOpportunityForOppportunityId(opportunityId);%0A%0A    if (opportunity.isEmpty()) %7B%0A      response.setContentType(%22text/html;%22);%0A      response%0A          .getWriter()%0A          .println(%0A              String.format(%22Error: No opportunity found for opportunityId %25s%22, opportunityId));%0A    %7D else %7B%0A      response.setContentType(%22application/json;%22);%0A      response.getWriter().println(CommonUtils.convertToJson(opportunity.get()));%0A    %7D%0A  %7D%0A%7D%0A

Add servlet for retrieving single volunteering opportunity.