InterDelphi Library - Howto | |||||||
This tutorial will teach you on how to create internet CGI/ISAPI applications using the Visual InterDelphi Components. | |||||||
1. Create a New CGI standalone application | |||||||
![]() | On the Delphi main menu select File/New and pick the "web server application". Select the first option to create a new ISAPI/NSAPI dynamic link library application. | ||||||
2. Add a New Form to your application | |||||||
On the Delphi main menu, select File/New Form. Add a TInterBody component to the form and one or more TInterLabels into the InterBody1. Change the captions of the labels and the colors as you wish. Add a TInterProducer and set the Body property to InterBody1. You may preview your home page by right-clicking on the InterBody1 and selecting "Browser Preview". Save this unit as "u1.pas" | |||||||
![]() | |||||||
3. Add one or more Action Itens to the WebModule | |||||||
![]() | Right-click on the web-module and select "Action Editor...". Right-click again and Add a New Action. | ||||||
4. Prepare the Actions | |||||||
![]() | Add one action and set the PathInfo property to "/form1". You may add more actions here! Select the first action and create a new event handler for OnAction as: (don't forget to add the new form unit on the uses clause) | ||||||
uses unit1; procedure TWebModule1.WebModule1WebActionItem1Action ( ); begin with TForm1.Create(self) do begin Response.Content:=InterProducer1.Content; Free; end; end; | |||||||
5. Compile the your application | |||||||
Compile your application and copy the "project1.dll" to the /scripts directory of your webserver (you may use the output compiler directory). Go to the browser and type http://localhost/scripts/project1.dll/form1 | |||||||
![]() | |||||||
Congratulations, you have finished your first ISAPI application! Now you may want to edit, modify and re-compile your application. Well, now it's time to introduce the InterDelphi ISAPI Manager. |