title: Want my spring controller to return a string without a view
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7672858/return-only-string-message-from-spring-mvc-3-controller">Return only string message from Spring MVC 3 Controller</a>  </p>
  </blockquote>
  
  
  
  <p>My spring controller has a endpoint where I want to only:</p>
  
  <pre><code>1. set the http response code
  2. return a string back, don't need to render a .jsp view page or anything.
  </code></pre>
  
  <p>So will want to set the http status code to 200 OK or 500 etc.
  And simply return a string like "OK".</p>
  
  <p>How can I do this, or am I forced to render a .jsp view page?</p>