Hello,
How to use action and sessions with HTML Web Modules?
It seems fcl-web is an incomplete work. How can i help? Is there any list of incomplete implementations/to-do works?
Regards

Mailing lists / fpc-pascal / 2018-02
3 messages · 2 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello,
How to use action and sessions with HTML Web Modules?
It seems fcl-web is an incomplete work. How can i help? Is there any list of incomplete implementations/to-do works?
Regards
African Wild Dog wroteHello, How to use action and sessions with HTML Web Modules?
What is not clear ?
There are several samples available that show their use ?
Also the WIKI has some pages about it
http://wiki.freepascal.org/fcl-web
There are some articles
https://idefix.freepascal.org/~michael/articles/
see the web1 and web2 and webserver articles.
I think Web2 explains what you need.
It seems fcl-web is an incomplete work. How can i help? Is there any list of incomplete implementations/to-do works?
Basic FCL-Web is very complete and in production use in many applications.
The only "incomplete" domain is pageproducer and friends (all things 'Producer'). This was an early attempt at mimicking early Delphi web classes, an approach which I have since abandoned.
But the JSON-RPC or Ext.Direct JSON RPC mechanism and data exhange mechanism and related things work very well in production since 7+ years.
If you have specific questions not answered in the above info, ask and I will do my best to answer.
Michael.
2018-02-23 19:36 GMT-03:00 Michael Van Canneyt :
According to your article, "Session support is introduced by TSessionHTTPModule". However, TFPHTMLModule descends from TCustomHTMLModule. TCustomHTMLModule descends from TCustomHTTPModule. Then, there is no session support for TFPHTMLModule.
Another point: using TFPHTMLModule, request are handled by the module itself through the OnGetContent event, not by the actions. In the other words, the request never is transferred to the actions.
*procedure TCustomHTMLModule.HandleRequest(ARequest: TRequest; AResponse: TResponse);*
*Var*
* FWriter : THTMLWriter;*
* B : Boolean;*
* M : TMemoryStream;*
*begin*
* FDocument := CreateDocument;*
* Try*
* FWriter:=CreateWriter(FDocument);*
* Try*
* B:=False;*
* If Assigned(OnGetContent) then*
* OnGetContent(Self,ARequest,FWriter,B);*
* If Not B then*
* Raise EHTMLError.Create(SErrRequestNotHandled);*
* If (AResponse.ContentStream=Nil) then*
* begin*
* M:=TMemoryStream.Create;*
* AResponse.ContentStream:=M;*
* end;*
* FDocument.SaveToStream(AResponse.ContentStream);*
* Finally*
* FreeAndNil(FWriter);*
* end;*
* Finally*
* FreeAndNil(FDocument);*
* end;*
*end;*