title: How to stop processing a JSP early?
body: <p>I've got a JSP page, which calls a function and checks its return value. If the return value is not null, the JSP page goes on to use it. If the return value IS null, I want the processing of the JSP page to stop (this is because the function will perform a redirect before returning the null object. Also, the rest of the JSP code obviously uses this object, and will get a null pointer exception if the function returned null).</p>
  
  <p>So my question is, what is the right way of stopping the load of a JSP page? Can I do something like this:</p>
  
  <pre><code>if (Func() == null) { return; }
  </code></pre>
  
  <p>Or is using a return in the middle of a JSP not the cleaner way to go about this?</p>
  
  <p>Thanks</p>