title: Error pages with Servlet 3.0
body: <p>In the <code>web.xml</code> file, I'm trying to specify an error page as follows.</p>
  
  <pre><code>&lt;error-page&gt;
      &lt;location&gt;/WEB-INF/jsp/admin/ErrorPage.jsp&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>I expect it to go without an error code according to Servlet 3.0 but it doesn't. I have to explicitly specify an appropriate error code for it to work something like the following.</p>
  
  <pre><code>&lt;error-page&gt;
      &lt;description&gt;Missing page&lt;/description&gt;
      &lt;error-code&gt;404&lt;/error-code&gt;
      &lt;location&gt;/WEB-INF/jsp/admin/ErrorPage.jsp&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>Why doesn't the former approach work with Servlet 3.0?</p>
  
  <hr>
  
  <p>I have upgraded NetBeans 7.2.1. It supports Apache Tomcat 7.0.27.0 which has Servlet 3.0 API.</p>
  
  <p>By the way, I have disabled the HTTP Monitor as it raises the following warning.</p>
  
  <blockquote>
    <p>MonitorFilter::WARNING: the monitor filter must be the first filter in
    the chain.</p>
  </blockquote>
  
  <p>It happened when I used Spring security in my application and it was reported as a <a href="http://netbeans.org/bugzilla/show_bug.cgi?id=204775" rel="nofollow">jira</a> issue.</p>