I want evaluate dynamically JavaScript code inside the Google App Engine runtime.
Java have this feature but Want to know if this is supported by GAE too.
If you can provide a simple code will be very appreciate, and if you use it, please shares comments about it, thanks.
...
GAE support Scripting Languages but by default 'JavaScript' service is not register. So GAE out-of-the-box do not evaluate JavaScript.
Last time I tried, though ScriptEngine is whitelisted, it is not available in the production environment. I had to package the Rhino.jar along with my app.
For examples on general usage of scripting in Java, you can refer to the Java documentation itself.
Though, note that in the GAE/J environment you will need to invoke the Rhino APIs directly.
For example,
https://developers.google.com/appengine/docs/java/jrewhitelist includes javax.script.ScriptEngine in its whitelisted (allowed) APIs, so, yes.