title: What represents the HttpStatus of a ResponseEntity object in Spring MVC?
body: <p>in the Spring MVC Showcase example dowlodable from the STS dashboard</p>
  
  <p>I have some doubt about the following situation:</p>
  
  <p>In my view I have the following link:</p>
  
  <pre><code>        &lt;li&gt;
              &lt;a id="responseEntityStatus" class="textLink" href="&lt;c:url value="/response/entity/status" /&gt;"&gt;ResponseEntity (custom status)&lt;/a&gt;           
          &lt;/li&gt;
  </code></pre>
  
  <p>This link generate an HTTP Request towards the URL: "/response/entity/status"</p>
  
  <p>This URL is handled by the following method of a @Controller class named <strong>ResponseController</strong> (which in turn is annotated with @RequestMapping(value="/response", method=RequestMethod.GET) )</p>
  
  <p>The method thath handled the previus HTTP Request is:</p>
  
  <pre><code>@RequestMapping("/entity/status")
  public ResponseEntity&lt;String&gt; responseEntityStatusCode() {
      return new ResponseEntity&lt;String&gt;("The String ResponseBody with custom status code (403 Forbidden)",
              HttpStatus.FORBIDDEN);
  }
  </code></pre>
  
  <p>This method return a <strong>ResponseEntity</strong> object and, reading the documentation, I understand that returning a setted ResponseEntity objct is substantially the same thing as a return a <strong>@ResponseBody String</strong> object</p>
  
  <p>So, in my particular case, I am returning a ResponseEntity object (that rappresent my HTTP Response) in wicht I have setted the</p>
  
  <ol>
  <li><p><strong>HTTP RESPONSE Body field</strong> with the String <strong>The String ResponseBody with custom status code (403 Forbidden)</strong></p></li>
  <li><p><strong>I have not setted Headers fields</strong></p></li>
  <li><p><strong>I have setted the HTTP Status status code to HttpStatus.FORBIDDEN</strong></p></li>
  </ol>
  
  <p>Now, I have read that this HttpStatus is a field of ResponseEntity class but I have not understand what this object exactly rappresent...</p>
  
  <p>So what rappresent the HttpStatus object? and what mean if it is setted to FORBIDDEN?</p>