Web.WebBroker.TWebApplication

From RAD Studio API Documentation
Jump to: navigation, search

Web.WebReq.TWebRequestHandlerSystem.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTWebApplication

Delphi

TWebApplication = class(TWebRequestHandler)

C++

class PASCALIMPLEMENTATION TWebApplication : public Web::Webreq::TWebRequestHandler

Properties

Type Visibility Source Unit Parent
class public
Web.WebBroker.pas
Web.WebBroker.hpp
Web.WebBroker Web.WebBroker

Description

TWebApplication encapsulates a Web server application.

TWebApplication provides the fundamental behavior of a Web server application. TWebApplication provides methods to create TWebRequest and TWebResponse objects that represent HTTP request messages and their responses, pass these objects to the dispatcher so that the response can be filled in, and send the response back to the Web client.

Each Web server project automatically declares an Application variable of type TWebApplication as the instance of the application:

  • For Apache applications, this variable is initialized to a TApacheApplication object in the Web.ApacheApp unit.
  • For CGI applications, this variable is initialized to a TCGIApplication object in the Web.CGIApp unit.
  • For ISAPI applications, this variable is initialized to a TISAPIApplication object in the Web.Win.ISAPIApp unit.

The Application variable is added to a project by selecting File | New | Other in the IDE main window and selecting WebBroker | Web Server Application in the New Items dialog.

Do not add a Forms unit (either Vcl.Forms or FMX.Forms) to the uses list of the project (Delphi) or include Vcl.Forms.hpp or FMX.Forms.hpp in the project source file (C++). These actions declare a conflicting Application variable of type TApplication.

In addition, do not add the Web.ApacheApp unit or the Web.Win.ISAPIApp unit to a CGI application, and do not add the Web.CGIApp unit to an Apache or ISAPI application. The CGIApp unit, the ISAPIApp unit, and the ApacheApp unit each create the initial instance of the Application variable. Including more than one of these units in the uses list causes the memory for the object created in the first unit to be lost.

See Also