RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomPageDispatcher.OnBeforeDispatchPage Event

Occurs before the page dispatcher passes an HTTP request to a Web page module for processing.

Pascal
property OnBeforeDispatchPage: TDispatchPageHandledEvent;
C++
__property TDispatchPageHandledEvent OnBeforeDispatchPage;

Write an OnBeforeDispatchPage event handler to process an HTTP request message before the dispatcher forwards it to the target Web page module for processing.  

This event can provide an alternate mechanism for handling request messages, and then set the Handled parameter to true to prevent the page dispatcher from locating the target Web page module, verifying that it can handle the request, and forwarding the request to that Web page module. 

If the event handler does not handle the request (for example, if it is merely maintaining a log of incoming requests), it can leave the Handled parameter as false and the dispatcher will continue with the default processing.

Tip: To access the Web request and response objects from within an OnBeforeDispatchPage event handler, call the global WebContext function to access the Web context and read its Request and Response properties.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!