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;
}
});