The following is an example of creating a stand-alone WEB model project.
Run .dml。
In the .dml program, select the webserver, enter the listening port of the Web server, enter the path of the context (note not to start with / at the beginning), and create a WebServer.dml model file after the input.
The WebServer.dml model is the model of Jetty server. Running this model can start the Web server.
After running, some default resources will be copied. The current directory is the root directory of the Web server, and you can write and run Web-related models.
The common WEB application model in XWorker is xworker.http.controls.SimpleControl, which is used to create HelloWorld model. SimpleThingEditor.dml can be run to create and edit models.
You can paste the following HelloWorld code in the XML editing schema. Notice the result node and change the path in value to the name of your model (if not HelloWorld).
<?xml version="1.0" encoding="utf-8"?> <SimpleControl name="HelloWorld" descriptors="xworker.http.controls.SimpleControl"> <view> <htmlCode name="htmlCode"> <htmlCode><![CDATA[<p>Hello world, hello xworker!</p> ]]></htmlCode> </htmlCode> </view> <result name="success" value="HelloWorld/@view"></result> </SimpleControl>
After entering the corresponding path, the WEB application model can be opened directly in the browser.
Copyright © 2007-2019 XWorker.org 版权所有 沪ICP备08000575号