Using the POST Method with HTML Anchor Tags

This behaviour is specific to display tag library. It allows for easily bookmarkable search results. If you really intend to change this to make use of POST, then you'd need to rewrite the display tag library or bring in some jQuery to manipulate the links.

The remnant of your questions boils nowhere. If you want GET (idempotent requests, bookmarkable URLs, searchbot-crawable URLs, etc), then use GET. If you want POST (non-idempotent requests, non-bookmarkable URLs, non-crawlable URLs, etc), then use POST.

Usually, POST is mandatory when the request can modify the data in the server. Think of a SQL INSERT, UPDATE, DELETE, etc. You certainly won't make this kind of requests GET. Imagine that you've a table with all "delete row" links which do GET and then a searchbot comes along...


You can use javascript. On onclick of link do form.submit

The only way I know of to deal with lenghty URL is to instead use POST.


You could do something like this:

<form method="post" action="target.html">
  <input type="hidden" name="name" value="value" /> 
  <a onclick="this.parentNode.submit();">click here</a>
</form>