title: Expression is undefined when try to call java method in Freemarker
body: <p>i try call java method from Freemarker template:</p>
  
  <p>my data class:</p>
  
  <pre><code>public class SimpleObject {
  
      private String id;
      private String name;
      public SimpleObject(String id, String name) {
          setId(id);
          setName(name);
      }
      public String getId() {
          return id;
      }
      public void setId(String id) {
          this.id = id;
      }
      public String getName() {
          return name;
      }
      public void setName(String name) {
          this.name = name;
      }
  }
  </code></pre>
  
  <p>my service class:</p>
  
  <pre><code>public class MainService {
  
      List&lt;SimpleObject&gt; getAll() {
          SimpleObject so = new SimpleObject("1", "Maksim");
          List&lt;SimpleObject&gt; sol = new ArrayList&lt;SimpleObject&gt;();
          sol.add(so);
          return sol;
      }
  }
  </code></pre>
  
  <p>transforming code:</p>
  
  <pre><code>MainService ms = new MainService();
  Map&lt;String, Object&gt; root = new HashMap&lt;String, Object&gt;();
  root.put("results", ms.getAll());
  StringWriter out = new StringWriter();
  Configuration cfg = new Configuration();
  cfg.setObjectWrapper(new DefaultObjectWrapper());
  Template temp = cfg.getTemplate(".test.ftl");
  temp.process(root, out);
  System.out.println(out.getBuffer().toString());
  </code></pre>
  
  <p>.test.ftl</p>
  
  <pre><code>&lt;#list mc.getAll() as result&gt;
  
    result.getName()
  
  &lt;/#list&gt;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Expression mc is undefined on line 3, column 8 in .test.ftl.
  The problematic instruction:
  ----------
  ==&gt; list mc.getAll() as result [on line 3, column 1 in .test.ftl]
  ----------
  </code></pre>