http://dev.helma.org/Wiki/RhinoLoader/
One thing I've tested it with is to create/mount JS-implemented
servlets and servlet filters in Jetty simply from the XML config file
(using Context.setClassLoader(), Context.addServlet(),
Context.addFilter()), and it worked very well.
The RhinoLoader class is currently pretty minimal, for real world usage
it would probably need some hooks to access the scope object, configure
the rhino context, and so on.
I don't think it makes much sense to maintain and distribute this as
standalone package, so I'd be happy if it (or something similar) could
be included with Rhino. What does everybody think?
Hannes
David Fu
--
firecat server-side javascript webserver
http://firecat.nihonsoft.org
http://blog.netbeans.jp/roller/page/fchoong
> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
For JS functions to be callable from Java, they'd need a Java method
declaration including parameter types, return types, accessibility,
thrown exceptions. You just can't do that (easily) with JavaScript.
Furthermore, the class then had to be around at compile time, which is
not the case with RhinoLoader.
The usage scenario for RhinoLoader is to have an interface (or base
class) on which the Java application operates, and have RhinoLoader
create a class that implements the interface (or extends the base
class) at runtime.
hannes
David Fu
--
firecat server-side javascript webserver
http://firecat.nihonsoft.org
http://blog.netbeans.jp/roller/page/fchoong
> fch...@netbeans.jp schrieb: