import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class Finish extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // database key for the source is passed in from the HTML form String keySource = request.getParameter("source"); // call a POJO to get the table body GetQuotes myQuotes = new GetQuotes(); String myTable = myQuotes.getTable(keySource); // forward this information to a .JSP for display request.setAttribute("quotes", myTable); RequestDispatcher view = request.getRequestDispatcher("/showquotes.jsp"); view.forward(request, response); } // end doGet @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } } // end class