I downloaded Freemarker 2.3.16 and try to use it through Java6 JSR-223 scripting API, I follow your documentation http://freemarker.org/docs-24pre1/pgui_misc_jsr223.html but without success, there is "You need not do anything special, just have freemarker.jar in your classpath for this to work.".
After some investigation I found that the problem is in Freemarker distribution, the freemarker.jar does not supports the JSR-223, because there is no META-INF/services/javax.script.ScriptEngineFactory configuration file, and no Fremarker-ScriptEngineFactory is provided in jar.
I try to search in your SVN repository and found the required sources in TRUNK:
http://freemarker.svn.sourceforge.net/viewvc/freemarker/trunk/freemarker/src/freemarker/ext/script/
http://freemarker.svn.sourceforge.net/viewvc/freemarker/trunk/freemarker/src/META-INF/
but these files are not included to Freemarker-builds. The SVN-TAGs http://freemarker.svn.sourceforge.net/viewvc/freemarker/tags/ does not contains these files any more.
The workaround is build these files from SVN myself or use the https://scripting.dev.java.net/ factory, that supports Freemarker for JSR-223.
Please repair the build or change documentation - how to use Freemarker with JSR-223 API.
This was only working in 2.4, not in the stable 2.3 branch. You was reading the docs of a 2.4 preview. Surely that 2.4 branch has died since then though... but this meant to be added to the next 2.4 series.
Last edit: Dániel Dékány 2014-06-15
Ticket moved from /p/freemarker/bugs/304/
Ticket moved from /p/fmpp/feature-requests/27/