Web pages are built in a sequence
Basic Capabilities
Project / Options / Directories/Conditionals / Output directory
http://computer_name/xyz.exe
WebActions
Of your available actions, one (and only one) should have the Default property set to true. This action will be called in the event that no action is explicitly called.
One way or another, the WebAction must return an html page. This can be via its OnAction event or generated by a Producer. Delphi 5 provides the following 4 Producers on the Internet tab.
PathInfo is used to select which WebAction is called.
http://system.com/cgi.exe/PathInfo?parm1=value1&parm2=value2It is automatically assigned to the name of the associated Producer ... modify it as appropriate.
PageProducer
TableProducer
Netscape really wants all pages to have titles, otherwise, the backbutton just shows numbers
Data Modules
Exception Exception in module xyz.exe at 00050A59. Only one data module per application.Uh, this actually means that you can't have ANY Data Modules in web servers - the WebModule counts as the one and only allowed module. (Boy, that really sucks.)
This error is displayed when you try to display the page ... not when you build (compile and link) it. I tried changing the order of the CreateForm commands ... it had no effect.
However, placing this code in the WebModule works
uses ..., abcDataModule, ... ; procedure TWebModule1.WebModuleCreate(Sender: TObject); begin xyzDataModule := TxyzDataModule.create(self); end; procedure TWebModule1.WebModuleDestroy(Sender: TObject); begin xyzDataModule.Free; end;
I don't understand why
xyzDataModule := TxyzDataModule.create(self);works, normally datamodules are initialized via
Application.CreateForm(TDataModule2, DataModule2);which reads the *.dfm file. However, single stepping a program proves that TxyzDataModule.create works correctly.
Debug Details
This is the cryptic error displayed when you try to open a web page.
--------------------------- abc.exe - Application Error --------------------------- The exception unknown software exception (0x0eedfade) occurred in the application at location 0x7c59bbf3.
To fix this, remember to remove the datamodule from the *.dpr (project) file.
Application.CreateForm(Tabc_DataModule, abc_DataModule);Author: Robert Clemenzi - clemenzi@cpcug.org