title: How to make Tomcat 6 server JSON content
body: <p>When I try to request for a non existent resource using a GET request for -</p>
  
  <p><a href="http://localhost:8080/jackrabbit/server/default/jcr:root/user/abc/article/article-1.0.json" rel="nofollow">http://localhost:8080/jackrabbit/server/default/jcr:root/user/abc/article/article-1.0.json</a></p>
  
  <p>I am expecting a 404 response but in JSON format. But instead I get an html response -</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/6.0.32 - Error report&lt;/title&gt;...&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>How can I make sure that this content is returned in JSON format instead of HTML format. I have specified the following in web.xml but that did not help -</p>
  
  <pre><code>&lt;mime-mapping&gt;
      &lt;extension&gt;json&lt;/extension&gt;
      &lt;mime-type&gt;application/json&lt;/mime-type&gt;
  &lt;/mime-mapping&gt;
  </code></pre>