private static final Logger LOG = Logger.getLogger(LatteServlet.class.getName());
final private Scriptable parent;
private Callable fn;
public LatteServlet() throws Exception {
ScriptLoader loader = new ScriptLoader();
this.parent = loader.getRoot();
loader.register("httpserver", new Callable() {
public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] params) {
fn = (Callable)params[1];
return null;
}
});
((Javascript)loader.get("init.js")).eval(null);
}