
用delphi XE7 的DataSnap REST Application 向导生成的程序,

会自动生成两个Html网页文件:\templates\ReverseString.html 和 \templates\ServerFunctionInvoker.html
并且运行程序,点击“Open Browser”按钮,会默认开启ReverseString.html 。
如何设置这个默认开启页面呢?
原来,在WebModuleDefaultAction中delphi xe7教程,如果Url中调用的是根路径::8080/,
则会:Response.Content := ReverseString.Content,打开的默认网页就是名为ReverseString的TPageProducer控件的HTMLFile中指定的网站:ReverseSring.html


这就明白如何改了吧,新增一个TPageProducer,命名为:Index,把HTMLFile属性改成Index.html
然后,在WebModuleDefaultAction中,把原本的:Response.Content := ReverseString.Content,
改成:Response.Content := Index.Content,
OK!
当然Index.html是必须你自己编写的网站文件。
用delphi XE7 的DataSnap REST Application 向导生成的程序,


会自动生成两个Html网页文件:\templates\ReverseString.html 和 \templates\ServerFunctionInvoker.html
并且运行程序,点击“Open Browser”按钮,会默认开启ReverseString.html 。
如何设置这个默认开启页面呢?
原来,在WebModuleDefaultAction中,如果Url中调用的是根路径::8080/,
则会:Response.Content := ReverseString.Content,打开的默认网页就是名为ReverseString的TPageProducer控件的HTMLFile中指定的网站:ReverseSring.html

这就明白如何改了吧,新增一个TPageProducer,命名为:Indexdelphi xe7教程,把HTMLFile属性改成Index.html

然后,在WebModuleDefaultAction中,把原本的:Response.Content := ReverseString.Content,
改成:Response.Content := Index.Content,
OK!
当然Index.html是必须你自己编写的网站文件。
用delphi XE7 的DataSnap REST Application 向导生成的程序,

会自动生成两个Html网页文件:\templates\ReverseString.html 和 \templates\ServerFunctionInvoker.html
并且运行程序,点击“Open Browser”按钮,会默认开启ReverseString.html 。

如何设置这个默认开启页面呢?
原来,在WebModuleDefaultAction中,如果Url中调用的是根路径::8080/,
则会:Response.Content := ReverseString.Content,打开的默认网页就是名为ReverseString的TPageProducer控件的HTMLFile中指定的网站:ReverseSring.html

这就明白如何改了吧,新增一个TPageProducer,命名为:Index,把HTMLFile属性改成Index.html
然后,在WebModuleDefaultAction中,把原本的:Response.Content := ReverseString.Content,
改成:Response.Content := Index.Content,
OK!
当然Index.html是必须你自己编写的网站文件。
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-137322-1.html
房价不降
写得不好