• 0

[Java EE] Access Javascript methods from Servlet?


Question

Hello. I wonder if it is possible to access Javascript methods from a servlet? Now I know that the path to a Javascript file (host on remote server), and in normal case, the user need to use a browser to access those methods. I wonder if it is possible to do the same thing on servlet?

I searched for a while and I found this:

http://docs.sun.com/source/816-6411-10/lc.htm#1008480

But it seems it requires additional libraries. Is there any other method that doesn't require additional libraries?

Thank you so much.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

It depends if you're wanting to just execute Javascript server-side or if you're wanting to call something in a user's browser. You can try Rhino or something similar if you just want to execute some non-client javascript server-side. And as far as I know, there's no really good javascript executing stuff directly in Java.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.