public void render(final StringBuilder buffer, Context cx, Scriptable scope, Object params) throws Exception {
script.eval(
cx,
scope,
new Tuple[] {
new Tuple("params", params),
new Tuple("echo", new Callable() {
public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] params) {
try {
if(params != null && params.length == 1) buffer.append(params[0].toString());
else throw new IllegalArgumentException("expecting 1 arg");