title: What is the simplest way to display httpServletResponse.sendError(403, "My Message") status from JSTL
body: <p>I have a servlet which does some error checking and if something is wrong I will typically do this:
  </p>
  
  <pre><code>response.sendError(403, "My message")
  return;
  </code></pre>
  
  <p>I <strong>don't</strong> want to throw an exception from the servlet - because I would like to conform with HTTP status codes.</p>
  
  <p>In the web.xml I have configured the following:
  </p>
  
  <pre><code>&lt;error-page&gt;
      &lt;error-code&gt;403&lt;/error-code&gt;
      &lt;location&gt;/failure.jsp&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>In the failure.jsp I have declared usage of JSTL and I would like to get the error messages displayed. I know that I can do the following in scriptlets:</p>
  
  <pre>
  &lt;%= request.getAttribute("javax.servlet.error.message") %&gt;
  </pre>
  
  <p>But I would like to use JSTL with some c:if clause so if I can drop using scriptlets, this would be appreciated.</p>
  
  <p>How can I easily fetch the values from the sendError statement in the servlet in the error page by using JSTL?</p>