src/java/br/org/catolicasc/fcgf/projprog4/web/controllers/ShowAllParametersServlet.java
/**
     * 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
     */
Processes requests for both HTTP GET and POST
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
Processes requests for both HTTP GET and POST 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
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        try (PrintWriter out = response.getWriter()) {
            response.setContentType("text/plain;charset=UTF-8");
            out.write("ShowAllParametersServlet (/show) ...\n");
            Enumeration<String> parameterNames = request.getParameterNames();
            while (parameterNames.hasMoreElements()) {
                String paramName = parameterNames.nextElement();
                out.write(paramName);
                out.write("=");
                String[] paramValues = request.getParameterValues(paramName);
                for (int i = 0; i < paramValues.length; i++) {
                    String paramValue = paramValues[i];
                    out.write(paramValue);
                    out.write("\n");
                }
            }
            out.close();
        } 
    }
protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { try ( PrintWriter out = response . getWriter ( ) ) { response . setContentType ( "text/plain;charset=UTF-8" ) ; out . write ( "ShowAllParametersServlet (/show) ...\n" ) ; Enumeration < String > parameterNames = request . getParameterNames ( ) ; while ( parameterNames . hasMoreElements ( ) ) { String paramName = parameterNames . nextElement ( ) ; out . write ( paramName ) ; out . write ( "=" ) ; String [ ] paramValues = request . getParameterValues ( paramName ) ; for ( int i = 0 ; i < paramValues . length ; i ++ ) { String paramValue = paramValues [ i ] ; out . write ( paramValue ) ; out . write ( "\n" ) ; } } out . close ( ) ; } }
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 .