daily pastebin goal
92%
SHARE
TWEET

ClientServlet.java

a guest Mar 14th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.example;
  2.  
  3. import javax.servlet.ServletException;
  4. import javax.servlet.annotation.WebServlet;
  5. import javax.servlet.http.HttpServlet;
  6. import javax.servlet.http.HttpServletRequest;
  7. import javax.servlet.http.HttpServletResponse;
  8. import java.io.IOException;
  9. import java.util.List;
  10.  
  11. @WebServlet(name = "ClientServlet", urlPatterns = {"/ClientServlet"})
  12. public class ClientServlet extends HttpServlet {
  13.  
  14.     protected void processRequest(HttpServletRequest request, HttpServletResponse response)
  15.             throws ServletException, IOException {
  16.         String nombres = request.getParameter("nombres");
  17.         String apellidos = request.getParameter("apellidos");
  18.         String nacimiento = request.getParameter("nacimiento");
  19.  
  20.         String email1 = request.getParameter("email1");
  21.         String email2 = request.getParameter("email2");
  22.         String email3 = request.getParameter("email3");
  23.         String email4 = request.getParameter("email4");
  24.  
  25.         log("### DEBUG ###");
  26.  
  27.     }
  28.  
  29.     @Override
  30.     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  31.         processRequest(req, resp);
  32.     }
  33.  
  34.     @Override
  35.     protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  36.         processRequest(req, resp);
  37.     }
  38.  
  39.     @Override
  40.     public String getServletInfo() {
  41.         return "Short description";
  42.     }
  43.  
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top