title: Configure Velocity to read template file outside of the classpath
body: <p>I am trying to configure Velocity to read the template file from the filesystem as opposed to it reading it from the classpath. I can get it to read the template file from the classpath if i configure velocityEngine as:</p>
  
  <pre><code>&lt;bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean" 
            p:resourceLoaderPath="classpath:/com/myapp/test" 
            p:preferFileSystemAccess="false"/&gt;  
  </code></pre>
  
  <p>And put the templatefile.vm in the com.myapp.test package. </p>
  
  <p>How can i change the above so that i can put the template file anywhere in the file system and access it. I tried this but it did not work. </p>
  
  <pre><code>&lt;bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean" 
            p:resourceLoaderPath="c:\home\users\me\app\templates" 
            p:preferFileSystemAccess="true"/&gt; 
  </code></pre>
  
  <p>I tried to google to see if i can find the solution but most examples are for Spring MVC configuration. I am using a standalone Spring application. </p>
  
  <p>Thanks</p>