title: Pass JSP Input with href link
body: <p>I want to pass input data with a href instead of a button. The problem is I am sending an array,  my for loop the input data is being stored so It creates multiple links. What is the course of action to take to fix this.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Firstjsp&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;% String locations[] = {"Loan 1", "33.890542", "151.274856", "Address 1","true", "-35404.34"};
  for (int i =0; i&lt;locations.length; i++)
  {
  %&gt;
  &lt;form name="submitForm" method="POST" action="Mapper.jsp"&gt;
  &lt;Input type = "Hidden" name = "loc" value = "&lt;%= locations[i] %&gt;"&gt;
  &lt;A HREF="Mapper.jsp"&gt;View Map&lt;/A&gt;
  &lt;/form&gt;
  
  &lt;%
  }   
  %&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>