title: Calling a servlet from a form but the servlet is never invoked
body: <p>I am trying to call a Servlet called AddClass.java using the following line in a jsp</p>
  
  <pre><code>&lt;form method="post" name="addClass" action="AddClass.do"&gt;
  </code></pre>
  
  <p>The class is in package <b>web</b> and the filename is <b>AddClass.java</b></p>
  
  <p>A similar servlet named SeedSearch is called (and everything works fine) from this piece of code in another jsp.</p>
  
  <pre><code>&lt;form method="post" name="seedSearch" action="SeedSearch"&gt;
  </code></pre>
  
  <p>My web.xml looks like this</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
  &lt;display-name&gt;sempedia&lt;/display-name&gt;
  
  &lt;servlet&gt;
    &lt;servlet-name&gt;SeedSearch&lt;/servlet-name&gt;
    &lt;servlet-class&gt;web.SeedSearch&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet&gt;
    &lt;servlet-name&gt;AddClass&lt;/servlet-name&gt;
    &lt;servlet-class&gt;web.AddClass&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;SeedSearch&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/SeedSearch&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;AddClass&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/AddClass.do&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;welcome-file-list&gt;
  &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
  &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
  &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
  &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
  &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
  &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
   &lt;/welcome-file-list&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Please help.</p>