WEB框架是用来编写WEB应用。
下面的是一个简单的WEB应用,它实现了httpDo方法。
<?xml version="1.0" encoding="utf-8"?>
<thing name="HttpDo" descriptors="xworker.lang.MetaDescriptor3">
<actions>
<GroovyAction name="httpDo">
<code><![CDATA[def content = """
Hello World!
任何实现了httpDo方法的事物都可以看作是Web应用,本示例就是如此。
Any thing implements httpDo method is a web application.
""";
response.setContentType("text/plain; charset=utf-8");
response.writer.println(content.toString());]]></code>
</GroovyAction>
</actions>
</thing>
运行后的截图如下。

Copyright © 2007-2019 XWorker.org 版权所有 沪ICP备08000575号