title: Passing parameter id onto another page
body: <p>I want to pass the id of the student from the display.jsp table in to my student.jsp. I have problem getting the id of the student. I can't get to display or get its values. Please do help. Thanks </p>
  
  <p>Here is my jdbc to select the id</p>
  
  <pre><code>public Student getStudentInfo(String id) {
          String SQL = "SELECT * FROM student WHERE id = ?";
          Event student = jdbcTemplateObject.queryForObject(SQL, new Object[] {id}, new StudentMapper());
          return student;
  
      }
  </code></pre>
  
  <p>display.jsp. Table of Student Info containing the id i want to pass</p>
  
  <pre><code>   &lt;tbody&gt;
          &lt;c:forEach var="studentinfo" items="${display}"&gt;
      &lt;tr&gt;
      &lt;td&gt;&lt;c:out value="${studentinfo.id}"/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;c:out value="${studentinfo.name}"/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;c:out value="${studentinfo.age}"/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;c:out value="${studentinfo.bday}"/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;c:out value="${studentinfo.address}"/&gt;&lt;/td&gt;
      &lt;td&gt;&lt;button type="submit" class="btn btn-danger btn-xs" name="deleteButton" value="${studentinfo.event_id}" onClick="return confirm('Are you sure you want to delete this student information?')"&gt;&lt;i class="fa fa-times"&gt;&lt;/i&gt;Delete&lt;/button&gt;
  &lt;td&gt;
  &lt;a href="${pageContext.request.contextPath}/student?id=${studentinfo.id}"&gt;&lt;c:out value="${studentinfo.id}"/&gt;&lt;/a&gt;
  &lt;/td&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
   &lt;/c:forEach&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>My Controller</p>
  
  <pre><code>@RequestMapping("/student")
      public String studentinfo(HttpServletRequest request, ModelMap model){
  
          try
          {
          StudentJDBC = (Student)context.getBean("studentJDBC");
          System.out.println(request.getParameter("id"));
          studentJDBC.getStudentInfo(request.getParameter("id"));
          }
          catch(Exception e){
              System.out.print(e);
          }
  
          return "student";
      }
  </code></pre>
  
  <p>And i want to display it from this jsp</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;label&gt;Student Id&lt;/label&gt;
                          &lt;div class="form-group"&gt;
                              &lt;span class="input-icon"&gt;
                                  &lt;span class="input-icon"&gt;
                                  &lt;input name="id" value="${studentinfo.id}"/&gt;
                                  &lt;/span&gt;
                          &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>