HTML Engine Server — sgcHTML | eSeGeCe

HTML Engine Server

TsgcHTMLEngine_Server — binds sgcHTML page rendering to a TsgcWSHTTPServer and serves rendered pages plus all embedded Bootstrap, htmx and Chart.js assets.

TsgcHTMLEngine_Server

An infrastructure component that attaches to a running TsgcWSHTTPServer, intercepts incoming HTTP requests and routes them to the correct sgcHTML page handler. Embedded Bootstrap, htmx and Chart.js are served automatically; no CDN required.

Component class

TsgcHTMLEngine_Server

Role

Serves sgcHTML pages over HTTP

Languages

Delphi, C++ Builder, .NET

Bind to a server and go live

Assign the Server property, set Active to True and every registered page is reachable over HTTP with Bootstrap CSS/JS served automatically from embedded resources.

uses
  sgcHTMLEngine_Server;

var
  oEngine: TsgcHTMLEngine_Server;
begin
  oEngine := TsgcHTMLEngine_Server.Create(nil);
  try
    oEngine.Server   := WSSServer;   // your TsgcWSHTTPServer
    oEngine.BaseURL  := '/';
    oEngine.Active   := True;
  except
    oEngine.Free;
    raise;
  end;
  // oEngine now serving; free it when the server shuts down
end;
// includes: sgcHTMLEngine_Server.hpp
TsgcHTMLEngine_Server *oEngine = new TsgcHTMLEngine_Server(NULL);
oEngine->Server  = WSSServer;
oEngine->BaseURL = "/";
oEngine->Active  = true;
using esegece.sgcWebSockets;

var engine = new TsgcHTMLEngine_Server();
engine.Server  = wssServer;
engine.BaseURL = "/";
engine.Active  = true;

Key properties & methods

The members you reach for most often.

Server

Assign the active TsgcWSHTTPServer the engine should serve HTTP requests through.

Active

Set to True to start the engine; it intercepts matching requests and delegates them to your page handlers.

BaseURL

The URL path prefix for all pages managed by this engine (default '/').

Static assets

Bootstrap CSS/JS and Chart.js are automatically served from embedded resources; no CDN required at runtime.

RegisterPage

Register a page handler at a specific sub-path so the engine routes requests to your sgcHTML rendering logic.

HandleRequest

Entry point called by the host server for each incoming request; routes to the correct page or serves a static asset.

Keep exploring

Online HelpFull API reference and usage guide for this component.
All sgcHTML ComponentsBrowse the full feature matrix of 80+ components.
Download Free TrialThe 30-day trial ships the 60.HTML demo projects.
PricingSingle, Team and Site licenses with full source code.
Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Ready to Get Started?

Download the free trial and start building web UIs in Delphi, C++ Builder and .NET.