title: Java: Is there a way to get the custom parameters from Freemarker Template
body: <p>I want to get all the custom parameters defined in my template in my java code.
  Example</p>
  
  <pre><code>&lt;pre&gt;&lt;code&gt;&lt;html&gt;&lt;head&gt;&lt;style&gt;td {
  font-family: monospace;
  font-size: 12px;
  }&lt;/style&gt;&lt;/head&gt;&lt;body&gt;
  &lt;table width="16%" border="0" align="center" cellspacing="0" cellpadding="0"&gt;
     &lt;tr&gt;
       &lt;td colspan="5" align="center"&gt;${test1}&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
      &lt;td colspan="5" align="center"&gt;${test2}&lt;/td&gt;
     &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/body&gt;&lt;/html&gt;&lt;/code&gt;&lt;/pre&gt;
  </code></pre>
  
  <p>I want something to get test1 and test2 parameters in my java code. So I want something below</p>
  
  <pre><code>Template template = this.getTemplate(ftl);
  // a, should have test1, test2 and in case template any other template then it should get parameters for that too
  String[] a= template.getAttributes();
  </code></pre>