title: Is it possible to enable/disable security constraints in web.xml on the basis of custom property?
body: <p>I have following <em>security-constraint</em> property in web.xml</p>
  
  <pre><code>&lt;security-constraint&gt;
      &lt;web-resource-collection&gt;
          &lt;web-resource-name&gt;TempName123&lt;/web-resource-name&gt;
          &lt;url-pattern&gt;/a/b/c&lt;/url-pattern&gt;
      &lt;/web-resource-collection&gt;
      &lt;auth-constraint&gt;
          &lt;role-name&gt;*&lt;/role-name&gt;
      &lt;/auth-constraint&gt;
  &lt;/security-constraint&gt;
  </code></pre>
  
  <p>Here, the main requirement is that this constraint needs to be loaded on certain basis. During installation, some user may chose to add this security or some may not.</p>
  
  <p>Is there any property based feature in jboss/tomcat which when set to true then this security constraint is considered, otherwise ignored ????</p>
  
  <p>PS: I am trying to avoid file based operations to edit <em>web.xml</em> file each and every time this feature needs to be added/removed.</p>