title: How to display values from controller inside jsp body
body: <p>Currently when I click on Refund button the ${messages} and ${changes} are displayed on the url instead of inside the jsp body.</p>
  
  <p>the url looks like this localhost:8080/name/?messages=Nice+Try%21&amp;changes=Quarters%3A+0+%7C+Nickels%3A+0%0ADimes%3A+0+%7C+Pennies%3A+0</p>
  
  <p>And nothing show up inside the jsp body at all.</p>
  
  <p>I tried c:out value="${changes}", it didn't work.
  I have also tried to change requestMethod into POST, no luck.</p>
  
  <blockquote>
    <p>Blockquote</p>
  </blockquote>
  
  <pre><code>JSP
  &lt;div class='row text-center' id='change-display'&gt;
      &lt;div id="change"&gt;
          ${changes}    &lt;---- should display the string, but nothing shows up here.
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class='row text-center' id='getChangeButtonDiv'&gt;
      &lt;a href="Money/refund"&gt;
          &lt;button class='btn btn-purchase' type='button' id='refund-button'&gt;
               &lt;p&gt;Refund&lt;/p&gt;   &lt;------- refund button
          &lt;/button&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  
  @RequestMapping(value="/refund", method=RequestMethod.GET)
  public String refund(Model model) throws PersistenceException{
      BigDecimal zero = new BigDecimal(0);
      BigDecimal total = service.calculateInsertedTotal();
      int quarterInt=0, dimeInt=0, nickelInt=0, pennyInt=0;
      String message="Here is your refund!";
  
      if(total.compareTo(zero) != 1){
          message="Nice Try!";
      }else{
          while(total.compareTo(quarter)==0||total.compareTo(quarter)== 1){
              quarterInt ++;
              total = total.subtract(quarter);
          }
          while(total.compareTo(dime)==0||total.compareTo(dime)== 1){
              dimeInt ++;
              total = total.subtract(dime);
          }
          while(total.compareTo(nickel)==0||total.compareTo(nickel)== 1){
              nickelInt ++;
              total = total.subtract(nickel);
          }
          while(total.compareTo(nickel)==0||total.compareTo(nickel)== 1){
              nickelInt ++;
              total = total.subtract(nickel);
          }
      }
      String quarterString = "Quarters: "+ quarterInt;
      String dimeString = "Dimes: "+ dimeInt;
      String nickelString = "Nickels: "+ nickelInt;
      String pennyString = "Pennies: "+ pennyInt;
      String changes = quarterString + " | " + nickelString
              +"\n"+dimeString + " | " + pennyString;
      service.removeMoney();
      model.addAttribute("messages", message);
      model.addAttribute("changes", changes);
      return "redirect:/";
  }
  </code></pre>