Template files can be stored on the classpath or within the repository
store.
Templates can be stored either on the classpath (for example, in ./tomcat/shared/classes/alfresco/extension/templates/webscripts) or in the repository store (for example, in Repository/Data Dictionary/Web Script Extensions).
In the case of the web script and Surf frameworks, FreeMarker is always selected as the template engine.