source: trunk/Pages/PageNotFound.pas

Last change on this file was 151, checked in by chronos, 9 months ago
File size: 630 bytes
Line 
1unit PageNotFound;
2
3interface
4
5uses
6 Classes, SysUtils, WebPage, HTTPServer;
7
8type
9
10 { TPageNotFound }
11
12 TPageNotFound = class(TWebPage)
13 procedure DataModuleProduce(HandlerData: THTTPHandlerData);
14 end;
15
16var
17 PageNotFound: TPageNotFound;
18
19
20implementation
21
22{$R *.lfm}
23
24uses
25 WebSession;
26
27{ TPageNotFound }
28
29procedure TPageNotFound.DataModuleProduce(HandlerData: THTTPHandlerData);
30begin
31 with TWebSession(HandlerData), HtmlDocument.Body, SubItems.AddString do begin
32 Response.StatusCode := StatusCodeNotFound;
33 Text := Format(SPageNotFound, [Request.Path.Implode('/')]);
34 GeneratePage(Self);
35 end;
36end;
37
38end.
39
Note: See TracBrowser for help on using the repository browser.