Dispatching Action Items
Go Up to Using WebSnap Index
Note: WebSnap is being deprecated in RAD Studio. Although WebSnap is still documented in the online help, the WebSnap product is no longer fully supported. As an alternative, you should begin using IntraWeb (VCL for the Web). IntraWeb is documented in this online help. For more documentation on IntraWeb, go to http://www.atozed.com/intraweb/documentation/index.aspx .
When responding to a request, the Web dispatcher (TWebDispatcher) searches through its list of action items for one that:
- Matches the PathInfo portion of the target URL's request message.
- Can provide the service specified as the method of the request message.
It accomplishes this by comparing the PathInfo and MethodType properties of the TWebRequest object with the properties of the same name on the action item.
When the dispatcher finds the appropriate action item, it causes that action item to fire. When the action item fires, it does one of the following:
- Fills in the response content and sends the response, or signals that the request has been completely handled.
- Adds to the response, and then allows other action items to complete the job.
- Defers the request to other action items.
After the dispatcher has checked all of its action items, if the message was not handled correctly, the dispatcher checks for specially registered auto-dispatching components that do not use action items. (These components are specific to multi-tiered database applications.) If the request message is still not fully handled, the dispatcher calls the default action item. The default action item does not need to match either the target URL or the method of the request.