title: Xframe option in tomcat 7
body: <p>I have added the below code snippet in my tomcat web.xml to prevent clickjacking.</p>
  
  <p>In the section to add built-in filter, I have added</p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;httpHeaderSecurity&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.catalina.filters.HttpHeaderSecurityFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;antiClickJackingOption&lt;/param-name&gt;
          &lt;param-value&gt;SAMEORIGIN&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/filter&gt;
  </code></pre>
  
  <p>For filter-mapping part I have added. </p>
  
  <pre><code>&lt;filter-mapping&gt;
      &lt;filter-name&gt;httpHeaderSecurity&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>After editing and making these two changes,test page (html page where I am trying to open the target page in <code>&lt;frame&gt;</code>) passes (not able to open the target page inside frames).<br>
  But the apache welcome page gives 404 with the new changes.</p>
  
  <p>Please let me know if I am missing anything.</p>