title: How to activate a HttpServlet class?
body: <p>I have a class with extends to <code>HttpServlet</code> class.</p>
  <pre><code>import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  public class GreetServer extends HttpServlet {
  
      protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
          resp.getWriter().print(&quot;hello client&quot;);
      }
  
      // Method to handle POST method request.
      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         doGet(request, response);
      }
  }
  </code></pre>
  <p>My question is, how do I make it working and handling POST and GET requests (What should I write in my <code>public static void main(String[] args)</code> method)?
  I'm using Heroku to deploy the app.
  Thank in advance.</p>