title: how to disable web page cache throughout the servlets
body: <p>To no-cache web page, in the java controller servlet, I did somthing like this in a method:</p>
  
  <pre><code>public ModelAndView home(HttpServletRequest request, HttpServletResponse response) throws Exception {
      ModelAndView mav = new ModelAndView(ViewConstants.MV_MAIN_HOME);
      mav.addObject("testing", "Test this string");
      mav.addObject(request);
      response.setHeader("Cache-Control", "no-cache, no-store");
      response.setHeader("Pragma", "no-cache");
      response.setDateHeader("Expires", 0);
      return mav;
  }
  </code></pre>
  
  <p>But this only works for a particular response object. I have many similar methods in a servlet. And  I have many servlets too.</p>
  
  <p>If I want to disable cache throughout the application, what should I do?
  (I do not want to add above code for  every single response object).</p>