title: jsf 2.0 return http error code after failed GET parameter validation
body: <p>I have this local URL:
  <a href="http://localhost:8084/Name/faces/Blah.xhtml?flkatid=AAA">http://localhost:8084/Name/faces/Blah.xhtml?flkatid=AAA</a></p>
  
  <p>and this is a segment from a facelet, that checks the parameter "flkatid" and assigns it to the bean:</p>
  
  <pre><code>    &lt;f:metadata&gt;
          &lt;f:viewParam name="flkatid"
                       id="flkatid"
                       value="#{floKatBean.flkatid}"
                       required="true"
                       requiredMessage="URL incomplete"
                       validator="#{floKatBean.validateFlKatId}"
                       validatorMessage="URL incomplete or invalid"
                       &gt;
          &lt;/f:viewParam&gt;
          &lt;f:event type="preRenderView" listener="#{floKatBean.init}"/&gt;
          &lt;f:event type="preRenderView" listener="#{floBean.holFloListe}"/&gt;
      &lt;/f:metadata&gt;
  </code></pre>
  
  <p>floKatBean.flkatid is an integer, thus the URL is invalid. A page is displayed, that tells this:</p>
  
  <p><em>flkatid: 'AAA' must be a number consisting of one or more digits. flkatid: 'AAA' must be a number between -2147483648 and 2147483647 Example: 9346</em></p>
  
  <p>JSF checks the parameter itself, because it knows that the bean element is an integer. The custom validator is only called if the parameter is an integer.</p>
  
  <p>Is it possible to get the server to return a HTTP error code, e.g. 403 (forbidden) without leaving the "standard JSF world" (or switch to RichFaces, MyFaces, SmileyFaces or whatever) ? I can't find anything in f:viewParam to "fail" the page. Maybe elsewhere?</p>