I am not sure I understand what you are trying to do.
Both the FTLTemplateProcessor and JSScriptProcessor are not compilers themselves - they may use a compiler internally, but may also be configured to use interpretation mode. The JSScriptProcessor is already capable of processing a String as source for the content of a script. Check out its public API defined by the ScriptProcessor interface.
The ProcessorModelHelper provides utility methods to populate a default model based on the current request context. Note that this only provides the same objects avaible to a Share web script. The Repository tier uses a custom framework of processors and utilities for the execution of web scripts and does not reuse most of the Spring web scripts default components.
You can of course always populate the model yourself, depending on what you need to be available.
Regards
Axel