title: JSP form submission URL with parameters
body: <p>I am working with plain JSP (JSF is NOT an option) on a web application. In a JSP file, I have a table, and in each row I display each student. Also, in each row I want to have an "edit" button, which will redirect to a page where we can edit this student and delete it. </p>
  
  <p>So far, I think the best think to do is to put a submittable form with only a button inside in each row.</p>
  
  <pre><code>&lt;table border="1"&gt;
      &lt;tr&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;LastName&lt;/th&gt;
          &lt;th&gt;Send Message&lt;/th&gt;
          &lt;th&gt;Erase&lt;/th&gt;
      &lt;/tr&gt;
      &lt;c:forEach items="${students}" var="bean"&gt;
          &lt;tr&gt;
              &lt;td&gt;${bean.name }&lt;/td&gt;
              &lt;td&gt;${bean.lastName }&lt;/td&gt;
              &lt;td&gt;&lt;input type="button" name="edit" value="Do!"
                  onclick="foo();" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;form action="&lt;%="EditStudent?studentid=6" %&gt;"&gt;&lt;input type="submit" value="Edit" /&gt;&lt;/form&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/c:forEach&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The form submission URL is just for test, hence the hardcoded "6" parameter as a student id. However, when I press the button, I get redirected to a page with URL <code>"http://localhost:8080/JSPProj/EditStudent?"</code>, where I can clearly see that any text after the question mark is ignored! If I remove the question mark, the URL redirect works (but there is no way to pass the parameter I want to the next servlet).</p>
  
  <p>Can anyone give me any insight as to why this happens?</p>
  
  <p>PS. I also tried with EL, and the same thing happens.</p>