| RTL reference|Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link To |
| ISAPI tutorial for Delphi developers | |||||||||||||||
| Page 4: Web Actions | |||||||||||||||
Before we start our first application (be patient, it will be the next chapter), I want to take a quick look at the heart of all web server extensions: The WebActions.
Let's take a look at what a request to our application might look like:
http://localhost/scripts/first.dll/theaction
As you can see, each call to the application is composed of:
1. The domain name
2. The virtual directory where the application is located
3. The name of the application (including it's extension)
4. And last but not least, the action.
In this case, our action is called "theaction". This last parameter (action) can be obtained in our application with the PathInfo property of the TWebRequest object (we will look into this in more depth later).
Once the request is made, the Dispatcher tries to match the PathInfo with an action. Once it finds one it then let's the action take care of the request. We will see later that you can actually make an action reply to a request but not "handle" it. That is, it sort of does some of the work and then passes it on to someone else (another action).
If an action is not found that matches the PathInfo, then the Dispatcher looks for the default action. You can set an action to be default by just assigning the Default property to True. Note that you can only have on default action per application. It doesn't matter what MethodType the default action is or whether it's enabled or not.
Method Types Before/After Dispatch There are another two interesting and useful events called BeforeDispatch and AfterDispatch. The BeforeDispatch event gets called whenever an action is called in the application and it's fired before the actual action. AfterDispatch is called after an action has been fired. Later, when we look at more advanced topics such as cookies and security, you will see that these events (specially the first one) come in very handy.
Handled Parameter Ok, that's enought theory. Let's go to the next topic and let's get down to some coding.
Next page > The first ISAPI application > 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? |
