title: Best way to set HTML head title in a Spring+Tiles2 application?
body: <p>I have a usability problem in my Spring webapp which uses Tiles as the view technology.
  At the moment all of the pages display the same <code>HEAD_TITLE</code> and the <code>PAGE_TITLE</code> is page specific:</p>
  
  <pre><code> &lt;html&gt;
   &lt;head&gt;&lt;title&gt;HEAD_TITLE&lt;/title&gt;&lt;/head&gt;
   &lt;body&gt;
   &lt;h1&gt;PAGE_TITLE&lt;/h1&gt;
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>
  
  <p>This is a major usability problem as the browsers history lists all different pages of the application with the same title. The reason why the <code>HEAD_TITLE</code> is same for all pages is that I haven't found a reasonable way to use the <code>PAGE_TITLE</code> as the <code>HEAD_TITLE</code>.</p>
  
  <p>In most cases the <code>PAGE_TITLE</code> comes from a message bundle with <code>&lt;fmt:message /&gt;</code> tag and 
  some parameters are passed to it. The Tiles layout is such that the <code>HEAD_TITLE</code> should be already set at that point because all pages of the webapp use the same common layout which defines the <code>&lt;HEAD&gt;</code> elements of the pages amongst other stuff.</p>
  
  <p>Any suggestions how to fix this usability problem? Should I set a "pageTitle" request attribute in my Spring controllers for all pages and use that as the <code>PAGE_TITLE</code> and also as the <code>HEAD_TITLE</code>? Or is it possible to somehow set the HEAD_TITLE in the page specific JSP?</p>