title: From a spring mvc controller action, how do I get access to request/response?
body: <p>My action looks like:</p>
  
  <pre><code>public String add() {
  
     return "/WEB-INF/views/add.jsp";
  }
  </code></pre>
  
  <p>In this case I need access to a posted form field parameter. Once I receive the posted parameter value, I will save it to the db and then return an http response code of 200 if there are no errors. If an error has occured, I will return HTTP 500 response code.</p>
  
  <p>How can I set the http response code in the return (instead of the view unless I can do both?).</p>