服务器端的 JavaScript, 看下 wikipedia 的介绍:
- 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 的原创文章, 请关注公众号 "汪子熙":
来源: http://www.bubuko.com/infodetail-3446368.html