As this may be interesting for the Nashorn community as well FYI: -------- Forwarded Message -------- Subject: Re: Run servlets on Nashorn written in server-side JavaScript Date: Sun, 28 Feb 2021 17:33:22 +0100 From: Rony G. Flatscher Reply-To: Tomcat Users List <us...@tomcat.apache.org> To: us...@tomcat.apache.org
Leo, On 26.02.2021 01:52, leo wrote: > On 25 Feb 2021, at 2:47, Rony G. Flatscher (Apache) wrote: > >> P.S.: Have tested my implementation with Nashorn on Java 8 and it works >> out of the box! Still, you >> would need to test the implementation thoroughly yourself (stability, >> performance, resources) and >> would be asked to come back with feedback on each of these qualities. So >> stay tuned, will publish a >> link to the implementation with a proper Nashorn/JavaScript sample war >> in this mail thread in a few >> days. > > How cool is this! Let me know when you it ready, please. Thanks a lot! O.K., had a few things I could finalize. Created two war files, "demoJavaScript.war" and "demoRhino.war". The first got tested against Nashorn, the second - you guessed it ;) - against Rhino (7.1.13). They are meant as little proof-of-concepts that should help you to get up and running with them. Please note that the libraries are beta, though appear to be stable. Yet, there may be errors/problems in them or there may be changes coming up. If you have feedback of any sorts, please come forward (stability, usability, performance, resources, etc.). Basically you just need to go to [1] and get the two war-files (copy to $CATALINA_HOME/webapps) plus either javax.ScriptTagLibs.jar (for Tomcat 9 or earlier) or jakarta.ScriptTagLibs.jar (for Tomcat 10) which you should copy to the shared directory at $CATALINA_HOME/lib and restart Tomcat to get them recognized. If you want to test with Rhino you should follow the directions at [1] and copy the mentioned two rhino jar files to the shared library directory as well. In general you should take the time and look over that page at [1], I tried to remain as brief as possible. :) Also please do not forget that the target audience of [1] has been so far the Rexx community and my BA students who learned programming using ooRexx in a semester and with that knowledge should now become able to create little web sites for their own purposes and maybe with some experience for small businesses/organizations given the information at [1] as a starting point. Of course, if there are any questions please do not hesitate and please ask them! HTH, ---rony [1] Homepage of the ScriptTagLibs libraries: <https://sourceforge.net/projects/bsf4oorexx/files/Sandbox/rgf/taglibs/beta/> ---rony