How can I run JavaScript code at server side Java code?

前端 未结 6 1512
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-09 18:45

I want to run JavaScript code at the server side. I want to manipulate result returned by JavaScript inside my Java code. How can it be done?

6条回答
  •  天命终不由人
    2020-12-09 18:57

    The start is clearly to look into rhino.

    I think you will find this 3 links very useful

    1. JavaScript EE, Part 1: Run JavaScript files on the server side
    2. JavaScript EE, Part 2: Call remote JavaScript functions with Ajax
    3. JavaScript EE, Part 3: Use Java scripting API with JSP

    You can also have a look to helma

    Helma is a server-side Javascript environment and web application framework for fast and efficient scripting and serving of your websites and Internet applications.

    Helma is written in Java and employs Javascript for its server-side scripting environment ...

提交回复
热议问题