Web file


A web file whose file name extension is .htm or .html is recognized as an HTML web file and will generate an executable entity if its transfer treatment property is set to Dynamic HTML page or Transfer also the static HTML page.

Properties
Name Name of the web file. It is mandatory.
It must be the same as the name of the corresponding file on disk. It will be part of the URL that will be used to access a web element in this web folder. The extension of the name will change if the web file is generated as an executable entity in the target language.
Folder Qualified name of the parent web folder
File location Path of the file on disk
HTML file Checked if this web file contains HTML formatted text
Entry file Checked if this web file can be an entry page. A web file is an entry page if it is not a fragment and all entry variables have default values.
HTML fragment Check if this HTML web file is treated as a fragment.
Filter out to tag If this web file is a fragment, only contents between two precise tags are taken into account. This property gives the name of these tags.
Transfer treatment Indicates which treatment to apply to web files during generation and deployment. Dynamic HTML page: this HTML web file is considered as a dynamic element and generated as an executable entity in the target language
Keep as static HTML page: this HTML web file is considered as HTML text and is copied unmodified in the target folder
Transfer also the static HTML page: this HTML web file is considered both as static HTML text and as a dynamic element, copied unmodified in the target folder and generated as an executable entity in the target language
Interfacing Describes the intervention of this web file in connection between modules.
None: used inside the module
Imported: the web file is a place-holder that must be associated to a web file which exists in the same module or is exported from an other module
Exported: the web file is accessible from outside the module in which it is defined.
For test purpose If checked and this file is in an imported module, this file does not participate in the generation of the entire web application.
Source filter The HTML source can be filtered in order to replace a sequence of characters with an other sequence. See Source filtering and relative URL.
No filter: no filter is applied to the source
Specific filters: this web file define filters and only these filters are applied
Inherited filters: only inherited filters from parent web folders are applied
Specific and inherited filters: the filters defined in this file and in the parent folders are applied.
Stay in cache for: (Seconds) Not cached or 0: This page is not cached.
A number of seconds: After generation of this page or fragment, its representation will stay and be read from the cache during the number of seconds specified.
See paragraph about Page cache.
Fragments

A dynamic web page can be composed of many fragments. An entire HTML page contains the tags <html>, <body>. A fragment that is inserted in an entire page should not contain these tags. However, HTML editors often add these tags when there are not present. So when a web file is identified as a fragment, the property Filter out to tag will give the innermost tag that delimits the content of the fragment. This tag is generally body.

Source filtering and relative URL

Most web scripting languages are not able to correctly handle relative URL resource names embedded in fragments because the current directory depends on the location where an enclosing dynamic page is executed.

Relative URL can be used if all enclosing web files are in the same folder as the fragment in which the URL is defined and no decision center is shared between web files.

Netsilon provides a System variable displayer - a decision center - that can be inserted before an URL relative to the document root and that will return the document root (root path) at execution time. See System variable displayer .

In order to handle relative URL, Netsilon provides also a mean to filter the HTML source to find a sequence of characters and replace it with a new sequence. Filters can be defined in a web file or zone or can be inherited from parent web folders.

A filter is defined by :
- a perl-like regular expression that describes the sequence of characters to find
- a sequence of characters that will replace the sequence of characters that matches the regular expression.

The substitution string can contain specific escape sequences:
- \1 to \7: replaced by the characters that match the n-th expression between parenthesis in the regular expression
- \ElementPath: replaced by the absolute path to the parent folder of the considered web element (root path and parent folder pathes)
- \ServerName: replaced by the server name property of the current Deployment site.
- \RootPath: replaced by the root path property of the current Deployment site.
- \TargetLanguageExtension: replaced by the target language extension property of the current Deployment site.

For example, the regular expression \.\.\/(images\/) will match every sequence of characters like ../images/. The substitution string \ElementPath\1 will replace the matched sequence by /parentfolder/images/ if the considered web file is contained in the root web folder parentfolder and the root path is /.

 
TOC ] Previous ] Next ]