title: How to invoke a controller using anchor tag in Spring-mvc?
body: <p>I want to invoke backend controller while anchor tag is clicked.
  I still want user to be taken to the url, but I need to perform some other logic in the code.   </p>
  
  <pre><code>&lt;a href="&lt;c:out value="${url}"/&gt;&lt;c:out value="${name}"/&gt;&lt;c:out value="${url}"/&gt;"&gt;&lt;c:out value="${name}"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>This question is very similar to <a href="https://stackoverflow.com/questions/24403672/how-to-invoke-a-controller-using-a-html-link-in-spring-mvc">How to invoke a controller using a html link in Spring-mvc?</a>
  But unfortunately, the answers in that question doesn't apply to my case. I don't want to change the href value.
  Thanks in advance.</p>