| RTL reference|Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link To |
| ISAPI tutorial for Delphi developers | ||||||||||||||||
| Page 5: The first ISAPI application | ||||||||||||||||
We are going to start off our tutorial with a very simple example of an ISAPI extension. This example is going to put to use what we saw in the previous chapter regarding web actions. This chapter is also intented to show you how to make use of the extension you have created. Please note, that as for all the examples of this tutorial I am assuming that you have a web-server installed on your computer (being it PWS, IIS, Apache or any other one).
From now on, I assume that the basic steps for creating a web server application are already known. If you still don't know how to start one, refer back to Pg 3: Getting started.
You should already have a new webmodule on the screen waiting for you to start dropping components on. Sorry to say, in this first example there will be * no component dropping *.
We are going to make only one action. Double click on the WebActionItems in the Object Inspector and create a new action. Name it waDEFAULT. Set the Default property to True and the PathInfo to /default
Now that we have the new action, double-click on the OnAction event and Delphi will insert the code for you. Once that is done, we are going to add the following code:
All this web action does is re-direct the request to the original URL from where it was made, i.e. to the call. SendRedirect redirects to a URL that is passed as a parameter. It is a method of TWebResponse. Response is basically the response to the HTTP request. You can respond in a wide variety of ways, either by a re-direction (as in this case), responding by setting the Content property and so on. I will focus on the TWebRequest and TWebResponse objects in later chapters.
Next page > A close look at the TWebRequest object > Page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
||||||||||||||||
All graphics (if any) in this feature created by Zarko Gajic.
| More Delphi |
|
· Learn another routine every day - RTL Quick Reference. · Download free source code applications and components. · Talk about Delphi Programming, real time. · Link to the Delphi Programming site from your Web pages. · Tutorials, articles, tech. tips by date: 2001|2000|1999|1998 or by TOPIC. |
|
· NEXT ARTICLE:
ADO Cursors - DB/10. Chapter ten of the free Delphi Database Course for beginners. How ADO uses cursors as a storage and access mechanism, and what you should do to choose the best cursor for your Delphi ADO application. |
| Stay informed with all new and interesting things about Delphi (for free). |
|
|
| Got some code to share? Got a question? Need some help? |

