title: How to map a servlet call from a JSP page using form action?
body: <p>I have a JSP page named Welcome_2.html <img src="https://i.stack.imgur.com/iKZvZ.png" alt="HTML page directory">and in its form action I have invoked a servlet like this :</p>
  
  <pre><code>&lt;form action="/servlets/MyFirstServlet" method="post" id="form_id"&gt;
  </code></pre>
  
  <p>The servlet "MyFirstServlet" is under <img src="https://i.stack.imgur.com/GGc3b.png" alt="servlet directory">
       WEB-INF
       classes
       servlets
       MyFirstServlet</p>
  
  <p>and the jsp is under the folder
       HTML 
  which is in the same level like WEB-INF</p>
  
  <p>i.e. inside practice I have 3 folders<img src="https://i.stack.imgur.com/8Go2I.png" alt="project structure">
       HTML
       META-INF
       WEB-INF</p>
  
  <p>in web.xml I have the following snippet </p>
  
  <pre><code>    &lt;servlet&gt;
      &lt;servlet-name&gt;MyFirstServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlets.MyFirstServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;MyFirstServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/servlets/MyFirstServlet&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Why the servlet is not being invoked? I am clicking on the HTML page on my browser and trying to invoke the servlet ... I am just a beginner 
  pardon me for my poor intellect.</p>