Sign in Join
FPDoc Onlineexperiment

TCustomWebApplication class

In unit CustWeb

Base class for web applications with integrated request handling

Declaration

pascal
TCustomWebApplication = class(TCustomApplication)

Inheritance

  1. TCustomWebApplication
  2. TCustomApplication
  3. TComponent
  4. TPersistent
  5. TObject

Description

TCustomWebApplication extends TCustomApplication to provide web-specific functionality. It integrates a TWebHandler instance for processing HTTP requests and provides properties for configuring web application behavior.

This class serves as the foundation for all web application implementations including CGI, FastCGI, and other HTTP hosting environments. It handles application lifecycle, event logging, and web handler management.

Errors

May raise exceptions during web handler initialization or request processing.

See also

Properties

WebHandlerprotected
HandleGetOnPostpublicControls whether GET requests are handled by POST handlers
RedirectOnErrorpublicControls whether errors trigger HTTP redirects
RedirectOnErrorURLpublicURL template for error redirects
ApplicationURLpublicBase URL for the web application
AllowDefaultModulepublicControls whether requests without module names use default modules
DefaultModuleNamepublicName of the default HTTP module
ModuleVariablepublicQuery parameter name for specifying HTTP module names
EmailpublicAdministrator email address for error notifications
AdministratorpublicAdministrator name for error pages
EventLogpublicEvent log instance for logging web application events
PreferModuleNamepublicControls module name extraction preference
LegacyRoutingpublicControls whether to use legacy request routing
IncludeStackTraceInErrorPagepublic

Methods

DoRunprotected
CreateEventLogprotected
FreeEventLogprotected
InitializeWebHandlerprotected
DoLogprotected
SetTitleprotected
CreatepublicCreates and initializes a new web application instance
DestroypublicDestroys the web application and cleans up resources
CreateFormpublicCreates a component instance with the web handler as owner
InitializepublicInitializes the web application with error handling enabled
TerminatepublicTerminates the web application and web handler

Events

OnGetModulepublicEvent for custom module selection logic
OnShowRequestExceptionpublicEvent for custom exception handling during request processing
OnUnknownRequestEncodingpublicEvent for handling unknown request content encodings

Inherited

From TCustomApplication (36)

AbortRun CaseSensitiveLongOptions CaseSensitiveOptions CaseSensitiveShortOptions CheckOptions ConsoleApplication EnvironmentVariable EventLogFilter ExceptionExitCode ExeName FindOptionIndex GetConsoleApplication GetEnvironmentList GetNonOptions GetOptionAtIndex GetOptionValue GetOptionValues GetParamCount GetParams HandleException HasOption HelpFile Location Log OnException OptionChar ParamCount Params Run ShowException SingleInstance SingleInstanceClass SingleInstanceEnabled StopOnException Terminated Title

From TComponent (74)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (37)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.