RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWebModule Class

TWebModule is the automatically generated Web module for a Web server application.

Pascal
TWebModule = class(TCustomWebDispatcher);
C++
class TWebModule : public TCustomWebDispatcher;

HTTPApp

When a new Web application is created, it automatically contains a Web module. The Web module serves as a repository for nonvisual components such as TPageProducer, TSQLDataSet, TDataSetTableProducer, etc. It also enables the Web server application to respond to HTTP request messages by passing the request and response objects to the appropriate action items. An application can have only one Web module. 

The TWebModule object manages a collection of action items which know how to respond to HTTP request messages. View, add and delete the action items managed by the Web module using the Action editor which is opened by double clicking on the TWebModule icon. 

If a data module already exists which contains many of the non-visual components and business rules for the application, the Web module can be replaced by that data module. Simply delete the Web module, add the new data module in its place, and add a TWebDispatcher object to the new data module. 

See the WebServ demo for an example of how to use TWebModule.

Note: When you create a new Apache module project and save it with a new name, it may be necessary to change the name of the apache_module (in the exports section of the project source code) by hand.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!