Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-04 Thread Christopher Schultz
Rony, On 3/4/21 07:00, Rony G. Flatscher (Apache) wrote: Hi Chris, On 03.03.2021 22:33, Christopher Schultz wrote: Rony, On 3/3/21 06:42, Rony G. Flatscher (Apache) wrote: Hi Chris, On 02.03.2021 17:48, Christopher Schultz wrote: Rony, On 2/28/21 11:33, Rony G. Flatscher (Apache) wrote:

Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-04 Thread Rony G. Flatscher (Apache)
Hi Chris, On 03.03.2021 22:33, Christopher Schultz wrote: > Rony, > > On 3/3/21 06:42, Rony G. Flatscher (Apache) wrote: >> Hi Chris, >> >> On 02.03.2021 17:48, Christopher Schultz wrote: >>> Rony, >>> >>> On 2/28/21 11:33, Rony G. Flatscher (Apache) wrote: Leo, On 26.02.2021

Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-03 Thread Christopher Schultz
Rony, On 3/3/21 06:42, Rony G. Flatscher (Apache) wrote: Hi Chris, On 02.03.2021 17:48, Christopher Schultz wrote: Rony, On 2/28/21 11:33, Rony G. Flatscher (Apache) wrote: 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

Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-03 Thread Rony G. Flatscher (Apache)
Hi Leo, On 03.03.2021 00:40, leo wrote: > Rony, > >> 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

Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-03 Thread Rony G. Flatscher (Apache)
Hi Chris, On 02.03.2021 17:48, Christopher Schultz wrote: > Rony, > > On 2/28/21 11:33, Rony G. Flatscher (Apache) wrote: >> 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

Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-02 Thread leo
Rony, 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

Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-02 Thread Christopher Schultz
Rony, On 2/28/21 11:33, Rony G. Flatscher (Apache) wrote: 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

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-28 Thread Rony G. Flatscher (Apache)
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,

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-25 Thread leo
Rony, 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

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-24 Thread Rony G. Flatscher (Apache)
On 23.02.2021 04:21, leo wrote: > On 18 Feb 2021, at 3:15, André Warnier wrote: > >> On 17.02.2021 14:59, Christopher Schultz wrote: >> >> […] On the face of it, it looks much simpler to set up a local Nodejs >> server, and proxy the >> corresponding requests from Tomcat to it. > > > Regarding

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-22 Thread leo
On 18 Feb 2021, at 5:50, Woonsan Ko wrote: [...] I found one example: https://stackoverflow.com/questions/27710407/reuse-nashorn-scriptengine-in-servlet As a servlet implementation may embed a Jython engine to execute a python script, it will end up embedding a JS engine in a servlet to

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-22 Thread leo
On 18 Feb 2021, at 3:15, André Warnier wrote: On 17.02.2021 14:59, Christopher Schultz wrote: […] On the face of it, it looks much simpler to set up a local Nodejs server, and proxy the corresponding requests from Tomcat to it. Regarding why a servlet _in_ Tomcat and not a proxy: The

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-22 Thread leo
Chris, On 18 Feb 2021, at 0:59, Christopher Schultz wrote: Weird; I never saw the OP on the list, only Rony's reply. Weird indeed. I just posted to users@tomcat.apache.org, but maybe because it was my first post it was held back for a while? Usually if you want to use server-side

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-22 Thread leo
Hi there First apologise that I reply so late and thank you all for chiming in! :-) Rony, 18:58, Rony G. Flatscher (Apache) wrote: why would you want to do that if you could do the same with Java? What is the motivation, the use case for you? Use case is a project where I want to

Re: Ad Apache Sling scripting (Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-19 Thread Woonsan Ko
On Fri, Feb 19, 2021 at 7:37 AM Rony G. Flatscher (Apache) wrote: > > Woonsan, > > On 18.02.2021 18:02, Woonsan Ko wrote: > > > You might want to take a look at this, too: > > - http://portals.apache.org/bridges/bridges-script/index.html > > > > Of course, there must be outdated dependencies, but

Re: Ad Apache Sling scripting (Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-19 Thread Rony G. Flatscher (Apache)
Woonsan, On 18.02.2021 18:02, Woonsan Ko wrote: > You might want to take a look at this, too: > - http://portals.apache.org/bridges/bridges-script/index.html > > Of course, there must be outdated dependencies, but the idea is the > same and it has working code: integrate with JSR-223 for jruby,

Re: Ad Apache Sling scripting (Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-18 Thread Woonsan Ko
You might want to take a look at this, too: - http://portals.apache.org/bridges/bridges-script/index.html Of course, there must be outdated dependencies, but the idea is the same and it has working code: integrate with JSR-223 for jruby, jython, bsh, js, etc. The portlet api (e.g, PortletRequest,

Ad Apache Sling scripting (Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-18 Thread Rony G. Flatscher (Apache)
Chris, On 18.02.2021 15:56, Christopher Schultz wrote: ... cut ... > A BSF / JSR-233 environment that is available for any servlet container would > certainly be an > accomplishment, and probably very useful for some shops (and students!). > > I wonder if there is anything we can learn / steal

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-18 Thread Christopher Schultz
Rony, On 2/18/21 09:26, Rony G. Flatscher (Apache) wrote: Hi Chris, On 17.02.2021 14:59, Christopher Schultz wrote: Rony and Leo, On 2/17/21 02:58, Rony G. Flatscher (Apache) wrote: Hi Leo, why would you want to do that if you could do the same with Java? What is the motivation, the use

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-18 Thread Rony G. Flatscher (Apache)
Hi Chris, On 17.02.2021 14:59, Christopher Schultz wrote: > Rony and Leo, > > On 2/17/21 02:58, Rony G. Flatscher (Apache) wrote: >> Hi Leo, >> >> why would you want to do that if you could do the same with Java? What is >> the motivation, the use >> case for you? >> >> How urgent is this (I may

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-17 Thread Woonsan Ko
On Wed, Feb 17, 2021 at 8:59 AM Christopher Schultz wrote: > > Rony and Leo, > > On 2/17/21 02:58, Rony G. Flatscher (Apache) wrote: > > Hi Leo, > > > > why would you want to do that if you could do the same with Java? What is > > the motivation, the use > > case for you? > > > > How urgent is

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-17 Thread Christopher Schultz
André, On 2/17/21 11:15, André Warnier (tomcat/perl) wrote: On 17.02.2021 14:59, Christopher Schultz wrote: Rony and Leo, On 2/17/21 02:58, Rony G. Flatscher (Apache) wrote: Hi Leo, why would you want to do that if you could do the same with Java? What is the motivation, the use case for

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-17 Thread tomcat/perl
On 17.02.2021 14:59, Christopher Schultz wrote: Rony and Leo, On 2/17/21 02:58, Rony G. Flatscher (Apache) wrote: Hi Leo, why would you want to do that if you could do the same with Java? What is the motivation, the use case for you? How urgent is this (I may have something for both, Java

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-17 Thread Christopher Schultz
Rony and Leo, On 2/17/21 02:58, Rony G. Flatscher (Apache) wrote: Hi Leo, why would you want to do that if you could do the same with Java? What is the motivation, the use case for you? How urgent is this (I may have something for both, Java EE and Jakarta EE, but need a little bit of

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-16 Thread Rony G. Flatscher (Apache)
Hi Leo, why would you want to do that if you could do the same with Java? What is the motivation, the use case for you? How urgent is this (I may have something for both, Java EE and Jakarta EE, but need a little bit of time)? —-rony On 15.02.2021 07:29, leo wrote: > Hi there > > I am

Run servlets on Nashorn written in server-side JavaScript

2021-02-14 Thread leo
Hi there I am trying to find out how to process servlets written in server-side JavaScript through Tomcat. I looked through the Tomcat FAQ and How-To but couldn't find anything. By googling I found a way to hook up Python through Jython's PyServlet class. I tried this and it works great.