title: How to create hyperlink in Spring + JSP
body: <p>What's the proper way to create a hyperlink in Spring+JSP? There must be a better way than just coding in the <code>&lt;a href="..."&gt;</code> tag. Take for example a page that displays people. The URL is <code>people.htm</code>. The corresponding controller gets people from the database and performs optional column sorting. The JSP might look like:</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;a href="people.htm?sort=name"&gt;Name&lt;/a&gt;&lt;/td&gt;
    &lt;td&gt;&lt;a href="people.htm?sort=age"&gt;Age&lt;/a&gt;&lt;/td&gt;
    &lt;td&gt;&lt;a href="people.htm?sort=address"&gt;Address&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt;
  ...
  </code></pre>
  
  <p>This seems bad as the URL <code>people.htm</code> is hardcoded in the JSP. There should be a way to have Spring automatically build the <code>&lt;a&gt;</code> tag using the URL defined in <code>servlet.xml</code>.</p>
  
  <p><strong>Edit</strong>: Maybe I should be using a Spring form.</p>