SAP Server Side JavaScript解决方案

142 阅读1分钟

服务器端的JavaScript, 看下wikipedia的介绍: en.wikipedia.org/wiki/JavaSc… Server-side JavaScript

In December 1995, soon after releasing JavaScript for browsers, Netscape introduced an implementation of the language for server-side scripting with Netscape Enterprise Server. Since 1996, the IIS web-server has supported Microsoft's implementation of server-side Javascript -- JScript -- in ASP and .NET pages. Since the mid-2000s, additional server-side JavaScript implementations have been introduced, such as Node.js in 2009. 再看SAP的Server Side(服务器端) JavaScript解决方案:SAP Extended Application Service 创建一个新的package:

创建一个新的Application:

创建一个新的文件test.xsjs, 内容如下:

var userInput = $.request.parameters.get("userStuff");
$.response.contentType = "text/html";
$.response.setBody(userInput);

这个hello world应用是一个简单的echo应用:将用户通过url传进来的数据直接输出。 测试:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":