This specification describes a &Web; optional module for &ActiveTags;. This &Web; module provides tags, attributes, functions and predefined properties related to &Web; applications.
The following specifications are part of the
This &ActiveTags; module has been designed to provide basic &Web; support. It provides a high-level abstraction of a &Web; application. A &Web; application runs inside a &Web; engine that embeds an &ActiveTags; engine. How the engines are cooperating is out of the scope of this specification.
Most &Web; concepts are represented in &ActiveTags; thanks to
The &Web; application is the top level entry to a set of services related to the application. A &Web; application is mapped either at the server root, or just under the server root :
According to the underlying &Web; engine used,
the &Web; application may endorse a set of informations accessible with &ActiveTags;
with the
The
A service defines mappings to handle HTTP requests with the
The &Web; engine may also provide a set of initialization parameters with the
A service can define an initialization phase thanks to the
When a service is invoked, the mapping (
A Web application is often deployed to a target location not necessary known by developers ; the resources that depend on the location of a web application must be accessed in a neutral way (without the knowledge of the real path where the application is located). To do so, an implementation of this module must rely on a file system manager that accept the web URI scheme.
The web URI scheme is like the file URI scheme, except that the root file depends on the location where the Web application is effectively deployed. For convenience, the web URI scheme may be translated to a more classical file scheme. If necessary, this translation may be performed by a catalog.
For example, the following URI "web:///WEB-INF/xslt/xmlToHtml.xslt" could be resolved to "file:///path/to/tomcat/myWebapp/WEB-INF/xslt/xmlToHtml.xslt".
The following
In this service, a stylesheet is parsed when the server starts. This stylesheet will be shared by all HTTP requests.
Assuming that the Web application is accessible with http://www.acme.org/foo/, this service might serves :
If not known before :
...will set the MIME type according to the extension.
If it doesn't depend on the extension :
The
On the opposite, if a list contains several items, it must be processed by retrieving the nodes that compose the list (notice that the XPath wildcard * is not relevant because strings are not like XML elements) :
&Web; namespace URI | : | &web; |
Usual prefix | : | web |
Root element for an
The
If present, the
The Web engine selects the
Defines the initialization procedure.
Registers this action to the
Run the subactions.
Handles an HTTP request.
Run the subactions.
A regular expression used to match the request's URL.
If missing, this procedure matches all URL with the method specified ; such mapping should be the last mapping defined in a service.
The string to use to test the regular expression.
It is possible to build other strings ; for example use="{$web:request/@web:full-path}" will produce /myApp/path/to/doc.html?param=value.
Forces any content in the buffer of the HTTP response to be written to the client.
Clears the buffer of the HTTP response, and eventually the status code and headers.
Invoke a service on the server.
The path to the service in the context of the current Web application.
The version of the &Web; module to use. This attribute should be encountered before any &Web; element, but it takes precedence on the element inside which it is hosted.
Return the MIME type of a file.
Represents a &Web; application.
Represents an HTTP service.
Represents an HTTP request.
As a request may handle several parameters that has the same name, it is recommended to use one of the following form when processing a single parameter :
If more than 1 parameter was supplied whereas only 1 is expected, the parameters in excess would be ignored.
Represents an HTTP response.
Represents a session.