Line | |
---|
1 | unit PageNotFound;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, WebPage, HTTPServer;
|
---|
7 |
|
---|
8 | type
|
---|
9 |
|
---|
10 | { TPageNotFound }
|
---|
11 |
|
---|
12 | TPageNotFound = class(TWebPage)
|
---|
13 | procedure DataModuleProduce(HandlerData: THTTPHandlerData);
|
---|
14 | end;
|
---|
15 |
|
---|
16 | var
|
---|
17 | PageNotFound: TPageNotFound;
|
---|
18 |
|
---|
19 |
|
---|
20 | implementation
|
---|
21 |
|
---|
22 | {$R *.lfm}
|
---|
23 |
|
---|
24 | uses
|
---|
25 | WebSession;
|
---|
26 |
|
---|
27 | { TPageNotFound }
|
---|
28 |
|
---|
29 | procedure TPageNotFound.DataModuleProduce(HandlerData: THTTPHandlerData);
|
---|
30 | begin
|
---|
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;
|
---|
36 | end;
|
---|
37 |
|
---|
38 | end.
|
---|
39 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.