src/java/Controller/PesquisaHospedeController.java
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException, SQLException {
        try {
            request.setAttribute("hospedes", Hospede.obterHospedes());
            RequestDispatcher view = request.getRequestDispatcher("/pesquisaHospede.jsp");
            view.forward(request, response);
        } catch (ClassNotFoundException | SQLException e) {
            throw new ServletException(e);
        }
    }
/**
     * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
     * methods.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     * @throws java.sql.SQLException
     */
Processes requests for both HTTP GET and POST
methods.


Processes requests for both HTTP GET and POST methods .
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException, SQLException {
        try {
            request.setAttribute("hospedes", Hospede.obterHospedes());
            RequestDispatcher view = request.getRequestDispatcher("/pesquisaHospede.jsp");
            view.forward(request, response);
        } catch (ClassNotFoundException | SQLException e) {
            throw new ServletException(e);
        }
    }
protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException , SQLException { try { request . setAttribute ( "hospedes" , Hospede . obterHospedes ( ) ) ; RequestDispatcher view = request . getRequestDispatcher ( "/pesquisaHospede.jsp" ) ; view . forward ( request , response ) ; } catch ( ClassNotFoundException | SQLException e ) { throw new ServletException ( e ) ; } }
Processes requests for both HTTP <code>GET</code> and <code>POST</code>
 methods.
Processes requests for both HTTP <code > GET< / code > and <code > POST< / code > methods .