title: Return specific HTTP response status in JSP
body: <p>I want to have a custom error code in my JSP, to prevent a special condition from happening:</p>
  
  <pre><code>boolean error;
  // do error checking here
  
  if (error) {
      throw new javax.xml.ws.http.HTTPException(400);
  }
  </code></pre>
  
  <p>However, this ends up throwing a 500 to the client, since the server interprets the exception as an internal issue. How can I send a status of 400 to the client?</p>