title: CRUD Application in one controller (servlet)
body: <p>Good day!</p>
  
  <p>I am planning to do a simple CRUD application. I am planning to make my add, edit, delete and view handled by one controller.  Something like this:</p>
  
  <pre><code>@WebServlet(name="ControllerServlet",
              urlPatterns = {"/add","/edit","/delete","/view"}
  </code></pre>
  
  <p>then just use this code in my controller:</p>
  
  <pre><code> String userPath = request.getServletPath();
      if (userPath.equals("/add")) {
   }
  </code></pre>
  
  <p>But I am not sure if this is a common practice. Anyway, I am wondering what is the best practice for this? What are the pros and cons of doing this instead of separating each controller? </p>
  
  <p>Thank you in advance.</p>