title: Sending request params to Freemarker templates (from SPring) ,getting InvalidReference exception
body: <p>From Spring Controller i am sending some request paramters to be fetched in FTL and be displayed.
  But somehow i am landing into InvalidReference Exception.
  I am totally new to FTL but i know this doesnt require much setup from spring either.</p>
  
  <p>All other ftls receving request params work but this ftl(searchPage) has only 1 requestParam used .</p>
  
  <p>In Spring Controller Method:</p>
  
  <pre><code>@RequestMapping("/searchPage") 
  public String SearchMethod(@RequestParam String x,@RequestParam(required=false) String op,MapModel m)
  {
  
  int myCount=Method_call_returns_int();.
  m.addAttribute("Count", myCount);
  
  return "searchPg";
  }
  </code></pre>
  
  <p>In FTL ,i import spring.ftl and use
  ${count!} or ${count} -to fetch dynamic value from controller.</p>
  
  <p>1.
   Exclamation mark -"!" i believe is not-null expression in freemarker.
  Somehow count is come to be 'null' in  FTL 
  ${count} -doesnt throw or display any exception because of ! 
  ${count!} throws InvalidReferenceExc .</p>
  
  <p>Please correct me here if i misunderstood meaning of !.</p>
  
  <p>2.I debugged java code and see that ModelMap has count added correctly but its only in FTL that not receiving it.</p>
  
  <p>I din't do any other setup explicitly and i dont think its required.</p>
  
  <p>I see other FTLs with similar cases working ,only difference is Object (in my case its int).</p>
  
  <p>Please suggest me what could be the reason .</p>