protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String filterString = request.getParameter("filter");
		int filter = (filterString == null) ? Search.BOTH : Integer.parseInt(filterString);
		String query = request.getParameter("query");
		Search s = new Search((Statement) getServletContext().getAttribute("statement"), query, filter);
		request.setAttribute("quizResults", s.getQuizResults());
		request.setAttribute("userResults", s.getUserResults());
		request.setAttribute("term", query);
		request.setAttribute("oldFilter", filter);
		
		RequestDispatcher dispatch = request.getRequestDispatcher("search.jsp");
		dispatch.forward(request, response);
	}