title: Programmatic Servlet 3.0 JSP jsp-property-group configuration
body: <p>I am able to create servlets and filters in my <a href="http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContainerInitializer.html" rel="nofollow">ServletContainerInitializer</a>, but is it possible to translate this last remaining piece of an old <code>web.xml</code> into Servlet 3.0 programmatic configuration?</p>
  
  <pre><code>&lt;jsp-config&gt;
      &lt;jsp-property-group&gt;
          &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
          &lt;page-encoding&gt;UTF-8&lt;/page-encoding&gt;
          &lt;trim-directive-whitespaces&gt;true&lt;/trim-directive-whitespaces&gt;
      &lt;/jsp-property-group&gt;
  &lt;/jsp-config&gt;
  </code></pre>