title: Dynamic Page Title Thymeleaf Spring MVC
body: <p>I'm using Thymeleaf for layouts in my project, but unable to get the page title dynamic.</p>
  
  <p><strong>Layout.jsp</strong></p>
  
  <pre><code>&lt;head th:fragment="headerfragment"&gt;
    &lt;title th:text="@{page-title}"&gt;&lt;/title&gt;
    &lt;!-- Bootstrap Core CSS --&gt;
    &lt;link th:href="@{/resources/css/bootstrap.min.css}" rel="stylesheet"
      type="text/css" /&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p><strong>Page.jsp</strong></p>
  
  <pre><code>&lt;head th:include="layout :: headerfragment"&gt;&lt;/head&gt;
  </code></pre>
  
  <p>When the final page is rendered i see title as <strong><em>page-title</em></strong> not the actual text</p>
  
  <p>In my controller I set the page-title attribute </p>
  
  <pre><code>modelMap.addAttribute("page-title", "Home");
  </code></pre>
  
  <p>I might not be doing it right as i'm new to thymeleaf. Please help me to find out the solution.</p>