package br.com.MDSGPP.ChamadaParlamentar.servlets;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.com.MDSGPP.ChamadaParlamentar.control.DeputadosControl;

public class PegarListaDeputados extends HttpServlet {
	
	private static final long serialVersionUID = 1L;

	protected void service (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		RequestDispatcher rd = null;
		try {
			ArrayList<String> lista = DeputadosControl.getDeputados();
			request.setAttribute("lista", lista);
			rd = request.getRequestDispatcher("/AcompanharParlamentar.jsp");
		} catch (ClassNotFoundException e) {
			rd = request.getRequestDispatcher("/Erro.jsp");
		} catch (SQLException e) {
			rd = request.getRequestDispatcher("/Erro.jsp");
		}
		
		rd.forward(request, response);		
	}
}

@@ -517,16 +517,252 @@
 ID = 1L;
+%0A%09%0A%09/**%0A%09 * This is the only method on the servlet, its responsibility is to retrieve%0A%09 * all the deputies name and sends it to the jsp page on an%0A%09 * %7B@link ArrayList%7D of %7B@link String%7D, so there can be an auto complete on%0A%09 * it.%0A%09 */
 %0A%0A%09prote

Comment the method of class PegarListaDeputados