Zone represents a mapping of a directory or URL into a group of configuration
sections.
|
Attributes
|
| name |
default |
description |
| path |
N/A
|
Path to which a zone maps to, relative to the zone's parent. Note that
the path may include several directories, for example:
path = anvil/forum. Slashes are not required
at the beginning and end of attributes.
This attribute is exclusive with pattern.
Note that pathinfo is cumulative: any zones under a server and
domain will inherit the paths from their parents.
|
| pattern |
N/A
|
Regular expression used to match the request pathinfo. This attribute
is exclusive with path.
|
| container |
N/A
|
URL or filename of container holding the scripts and templates.
File and file:// containers are more effective than other URL containers.
Zones and domains inherit containers from parents,
so that the parts of the path that are declared between the specified zone or domain
and the structure declaring the container will be added to the
container.
|
| adapter |
N/A
|
Due to differences in servlet enviroments, it
is sometimes necessary to set this attribute if there are problems
with request handling.
It can be the name of the class implementing
RequestAdapterFactory
or one of predefined adapters. See Providers for details.
|
| repositories |
N/A
|
A space-separated list of repositories used when loading compiled scripts. Repositories may be URLs, jar files, or directories containing
class files.
|
| hidden |
false
|
Controls whether the zone is considered hidden: any requests coming to
it will generate a "403 - Forbidden" message.
|
| invalidate |
true
|
Controls whether scripts and templates should always be checked and
recompiled if their time-stamps have been changed.
This is useful in a development environment. In a production environment,
it should normally be deactivated due to its small performance penalty.
See compiler.
|
| index |
index.nvl
|
Directory index file. To override this behaviour, give index an empty value.
|
| dispatcher |
N/A
|
Dispatcher script that should be placed in this zone. Every request coming to this zone or its child zones will have the request propagated to a given script.
This makes it possible to create a servlet-style approach for building applications.
To override this behaviour in child elements, give dispatcher an empty value.
|
| content |
compress
|
Controls html content compressing/preserving.
There are four possible options:
preserve: content is retained as is
compress: whitespaces from character data's are compressed.
pack: whitespaces from character data's are compressed radically.
silent: no character data and tag content is outputted
Compressing will decrease the footprint of the generated page but
might generate unwanted results, such as elements positioning too close
to each other.
Content is also controlled with same flags at
<module> and
<function> tag, and with
<preserve>,
<compress>,
<pack>,
<silent> tags
which overrides the behaviour declared in configuration.
|
| pretty |
false
|
Controls pretty printing. As Anvil aggressively optimizes HTML by removing redundant whitespace,
the generated HTML code is usually difficult to understand.
When pretty printing is enabled, the generated HTML is formatted to be more readable.
While this is a relatively heavyweight operation, it is useful
during development.
|
| assert |
false
|
Controls assertion facility (assert statement).
If enabled, assertion failures generate an exception; otherwise,
they are ignored.
|
| debug |
true
|
Controls if the generated java classes retain information
about orignal line numbers. Retaining line numbers will give
small negative impact (~1%) to performance.
|
| namespace |
N/A
|
Namespace for Anvil tags in templates. This can also be controlled by
adding an Anvil processing instruction before a template tag:
<?anvil namespace="nvl" ?>
<nvl:template>
...
</nvl:template>
|