title: How to call a Grails service in a view?
body: <p>Simple question :
  I have a service class (let's say <code>helpersService</code>) and a method <code>def constructURI(params)</code>.
  How can I call this method from a template view.</p>
  
  <p>I have tried the following code without success</p>
  
  <pre><code>&lt;% def helpersService  = new HelpersService() // or def helpersService
  %&gt;
  &lt;img src="${helpersService. constructURI(params)}"/&gt;
  </code></pre>
  
  <p>But I get the following result:</p>
  
  <pre><code>No signature of method: com.HelpersService. constructURI() is applicable for argument types...
  </code></pre>
  
  <p>or (in case I use <code>def helpersService</code>)</p>
  
  <pre><code>Cannot invoke method constructURI() on null object 
  </code></pre>
  
  <p>Any ideas?</p>