Server-side processing
A basic level of server-side processing can be utilized with any file hosted on the Diffusion™ web server that has a text mime type and JavaScript® .
There are three server-side tags: Include, Publisher and Topic Data. These tags are stored in HTML comments so as to not interfere with normal HTML .
Include Tag
Include stubs load the file specified in the file attribute and are loaded as is into the parent HTML document. They do not necessarily have to be valid HTML . They can be positioned anywhere within the HTML file.
These includes are synonymous with #Include statements of ANSI C.
Below is an example of the syntax:
<!--@DiffusionTag type="Include" file="stub.html" -->
Include files can be nested so an include file can contain an include tag
Publisher tag
Publisher tags enable a publisher to interact with the web page during the serving process. Again these tags can appear anywhere within the HTML document. In the case below the publisher method processHTMLTag of the Trade publisher is called with the tag argument of table The publisher can return a String of HTML that is inserted into the document at the position of the tag and the tag is removed. The processHTMLTag method is also called with the HTTP Request, although the request cannot be written to. Below is an example of the syntax<!--@DiffusionTag type="publisher" publisher="Trade" tagid="table" -->
TopicData
<!--@DiffusionTag type="TopicData" name="Assets/FX/EURUSD/O" -->
HTTP listener
void handle HTTP Request( HTTP VirtualHost virtualHost, HTTP Request request)This enables for more detailed statistics to be captured from the HTTP request