[fpc-pascal] fpWeb: Error when trying to call a module without an action

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Sat Mar 10 16:02:09 CET 2012



On Fri, 9 Mar 2012, michael.vancanneyt at wisa.be wrote:

> On Fri, 9 Mar 2012, Sven Barth wrote:
>
>> I'm using the embedded webserver variant and the error only surfaced after 
>> I added a second module which let's me assume that the problem is the same 
>> as this: 
>> http://lists.lazarus.freepascal.org/pipermail/lazarus/2011-June/063655.html
>
> And what exactly is the problem ?
>
> You can set the default module name in the TFPWebApplication. But in that 
> case, the path is interpreted as the action to execute, so the
> correct URL would be
>
> http://localhost:4321/list
>
> to have the module first requires an additional property and patch.
> This is planned.


I implemented the 'PreferModuleName' property in TWebHandler and TFPCustWebApplication in rev. 20495.

if set to True, then the URL

http://localhost:4321/treenode/

will select the 'treenode' module.

Default for the new property is currently 'False', which is backwards compatible.

Michael.



More information about the fpc-pascal mailing list