0
votes

I want to use JavaScript in one of my Java applications. So I ran this test:

javax.script.ScriptEngineManager manager = new ScriptEngineManager();
javax.script.ScriptEngine engine = manager.getEngineByName("JavaScript");
System.out.println(engine);
javax.script.List<ScriptEngineFactory> factories = manager.getEngineFactories();
System.out.println(factories.isEmpty());

Result:

null
true

So there's no JavaScript on default liberty profile. How do I activate that?

1
Yes it does. And when you repeat your comment as an answer I can properly accept it :-) - stwissel
It also screws up the creation of the proper server.xml - stwissel
You may need to build up a server xml similar to the default one in liberty on bluemix (ng.bluemix.net/docs/#starters/liberty/index.html, scroll down to "Stand-alone Applications"). But the set of features available, and their versions, in the custom buildpack may vary. - Brian Gleeson - IBM

1 Answers

1
votes

You may need to build up a server.xml similar to the default one in liberty on Bluemix. You can do this by uploading Liberty and your server.xml to Bluemix. Bluemix will pull out the server.xml and enable that feature. Go here for more info.

Basically everything in wlp/usr/servers/<yourservername> needs to be uploaded to Bluemix with a cf push from wlp/usr/servers/<yourservername>.