title: Accessing methods of subclass within Velocity templates
body: <p>I have the following classes:</p>
  
  <pre><code>public abstract class A{
      private String s;
      public void setS(String s){
         this.s=s;
      }
      public String getS(){
         return this.s;
      }
  }
  public class B extends A{
      private String s2;
      public void setS2(String s2){
         this.s2=s2;
      }
      public String getS2(){
         return this.s2;
      }
  }
  public class C{
      private A a;
      public setA(A a){this.a = a;}
      public getA(){return this.a;}
  }
  </code></pre>
  
  <p>I created 2 objects:</p>
  
  <pre><code>B b = new B();
  b.setS("some string");
  C c = new C();
  c.setA(b);
  </code></pre>
  
  <p>When I load the object into a Velocity template :</p>
  
  <pre><code>My Template
  $c.a.getS()
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>My Template
  $c.a.getS()
  </code></pre>
  
  <p>And not wat it should be:</p>
  
  <pre><code>My Template
  some string
  </code></pre>
  
  <p>It seems like Velocity doesn't know to load in the template methods inherited from super classes.
  Is this true? Or am I missing something here.</p>