title: How to set Character Encoding and Content Type globally in a Java web app?
body: <p>I have this piece of code in each Servlet I have: </p>
  
  <pre><code>httpServletRequest.setCharacterEncoding("utf-8");
  httpServletResponse.setContentType("text/html;charset=utf-8");
  </code></pre>
  
  <p>Is there any way to set these globally for the application?</p>