Database Reference
In-Depth Information
Ignoring the request
If you don't want the controller to do anything and simply pass the request on for
normal processing, either output nothing or use an
ignore
element. Skipping any
URL rewriting is mostly used for “miscellaneous” requests, like for images or style‐
sheets. The format is:
<ignore
xmlns=
"http://exist.sourceforge.net/NS/exist"
>
cache-control?
</ignore>
Cache control is explained in
“URL rewrite caching” on page 202
. When a request is
ignored, cache control is usually on.
Redirecting the request
If you want the controller to
redirect the client
to another URL, use a
dispatch
ele‐
ment with a
redirect
child element. This will cause the client to issue a new request,
potentially triggering the controller again. The format is:
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
redirect
cache-control?
</dispatch>
The
redirect
element is defined as:
<redirect url =
string
>
Cache control is explained in
“URL rewrite caching” on page 202
.
Forwarding the request
If you want the request forwarded to a specific resource
on the server
, use a
dispatch
element with a
forward
child. The format is:
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<forward url =
string
servlet? =
string
absolute? = "yes" | "no"
method? = "POST" | "GET" | "PUT" | "DELETE" >
( add-parameter | set-attribute | clear-attribute | set-header )*
</forward>
</dispatch>
url
directs the request to a new request path. This is equivalent to directly
requesting this path, but without a controller present.
A relative path will be resolved relative to the original request path.
An absolute path will be resolved relative to the path that triggered the controller.
For example, if the original URL started with
http://localhost:8080/exist/apps/…
Search WWH ::
Custom Search