[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Base class for handling HTTP requests in web applications
Source position: custweb.pp line 44
type TWebHandler = class(TComponent) |
||
public |
||
constructor Create(); override; |
|
Creates a new web handler instance |
destructor Destroy; override; |
|
Destroys the web handler instance |
procedure Run; virtual; |
|
Main request processing loop for the web handler |
procedure Log(); |
|
Logs an event message using the configured log handler |
procedure DoHandleRequest(); |
|
Handles a complete HTTP request with error handling and cleanup |
procedure HandleRequest(); virtual; |
|
Routes and processes an HTTP request to the appropriate handler |
property HandleGetOnPost: Boolean; [rw] |
|
Controls whether GET requests are handled by POST handlers |
property RedirectOnError: Boolean; [rw] |
|
Controls whether errors trigger HTTP redirects |
property RedirectOnErrorURL: string; [rw] |
|
URL template for error redirects |
property ApplicationURL: string; [rw] |
|
Base URL for the web application |
property AllowDefaultModule: Boolean; [rw] |
|
Controls whether requests without module names use default modules |
property DefaultModuleName: string; [rw] |
|
Name of the default HTTP module for requests without explicit module names |
property ModuleVariable: string; [rw] |
|
Query parameter name for specifying HTTP module names |
property OnGetModule: TGetModuleEvent; [rw] |
|
Event for custom module selection logic |
property Email: string; [rw] |
|
Administrator email address for error notifications |
property Title: string; [rw] |
|
Application title displayed in error pages |
property Administrator: string; [rw] |
|
Administrator name for error pages |
property OnShowRequestException: TOnShowRequestException; [rw] |
|
Event for custom exception handling during request processing |
property OnIdle: TNotifyEvent; [rw] |
|
Event triggered when the handler is idle between requests |
|
Event for logging web application events and errors |
|
property OnUnknownRequestEncoding: TOnUnknownEncodingEvent; [rw] |
|
Event for handling unknown request content encodings |
property OnInitModule: TInitModuleEvent; [rw] |
|
Event for initializing HTTP modules before request processing |
property PreferModuleName: Boolean; [rw] |
|
Controls whether module name extraction is preferred over path info parsing |
property LegacyRouting: Boolean; [rw] |
|
Controls whether to use legacy request routing instead of HTTP router |
end; |
|
Base class for handling HTTP requests in web applications |
|
| | | ||
| | | ||
| | | ||
TWebHandler is the core component that handles HTTP requests in web applications. It provides the framework for routing requests to appropriate HTTP modules, handling errors, and managing the request-response cycle. This class serves as the foundation for all HTTP hosting implementations including CGI, FastCGI, HTTP server and Apache modules.
The handler supports both legacy routing and new HTTP routing systems, module lifecycle management, error handling with custom exception display, and event logging.
May raise HTTP-related exceptions during request processing.
|
Base class for web applications with integrated request handling |