Example 2: Model dynamic web page

     You can also write dynamic web pages using models. The video below demonstrates a dynamic model web page, which is in Example 1 based on.

HelloWorld.dml

<?xml version='1.0' encoding='utf-8'?>

<thing name="helloWorld" descriptors="xworker.lang.MetaDescriptor3" label="Hello World"
     json_array_type="">
    <actions>
        <GroovyAction name="httpDo">
            <code><![CDATA[response.setContentType("text/plain; charset=utf-8");
response.writer.println("Hello World!");]]></code>
        </GroovyAction>
    </actions>
</thing>

 

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