title: How to show error message on same page in spring MVC
body: <p>I am calling a controller in spring mvc with form data. </p>
  
  <p>Before saving, I check if the id is a certain range. If the id is not within the range, I need to show a message on the same page saying <code>The id selected is out of Range, please select another id within range</code>. </p>
  
  <p>I found samples on internet where I can redirect to failure jsp in case anything goes wrong. But how to do it in my case?</p>
  
  <pre><code>@RequestMapping(value = "/sendMessage")
  public String sendMessage(@ModelAttribute("message") Message message,
          final HttpServletRequest request) { 
      boolean check = userLoginService.checkForRange(message.getUserLogin());
      if(!check){
          return "";  //What Should I do here??????
      }
  }
  </code></pre>