title: What's the recommended way to implement generic functionality on spring MVC?
body: <p>Let's say I want to do the same thing the Masterpage's code behind does on ASP.NET side. I'm currently learning Spring MVC and Im using JSP for my views. I know for the JSP side, everytime I create a page I include header.jsp and footer.jsp.</p>
  
  <p>Lets say I have this var in my header.jsp ${ItemsQty} I would have to tho this in all controllers request mappings to get the value inserted.</p>
  
  <pre><code>model.addAttribute("ItemsQty", ItemsServices.count());
  </code></pre>
  
  <p>What's the correct way to set this value? adding the attribute in all controllers, all request methods?</p>
  
  <p>Regards.</p>