Definition of Whitebeam XML Tags
Server-side redirect to another page
The body of this tag is always empty.
Target for the redirection. The virtual-server based path to the
file to load in place of the current one.
This function directs the Presentation Engine to discard the output from
the page currently being generated and instead to load an alternative page,
run that and use the output as the generated results for this page.
The 'src' attribute is the path name of the alternative resource to load.
The name is relative to the file system root of the clients virtual server
The Presentation Engine does not abort execution of the current
page. Execution is completed then the output is simply discarded. This means
that subsequent server side interactions with the templates will still take
The 'environment' that the redirected page sees is identical to that of
the original page - that is it the rb.page.env.xxxx() methods return the same
values, the HTTP access method is the same and the parameters are the same.
The redirected page can in turn direct to a further page.
One of the most valuable uses for redirection is in the development
of server-side processed forms - or more precisely a sequence of forms similar
to a 'wizard' - where the user completes a multi-page form. Having completed
the first page the user moves to the next page.
Traditionally each 'form' would comprise two parts - the display of the form
and the processing of the data when it is submitted. Often a single file would
contain the display of one page and the processing of the previous page.
With 'redirect' the author can keep all this functionality in one file. The
page can look at the form post data and decide whether or not the data is being
submitted. If it is NOT being submitted then it displays the page. If it is
being submitted it process the form-data and then issues a <rb:redirect...>
tag to get the next page to display its data.
var formdata = rb.page.formdata();
var submit = formdata.firstname;
<!-- This is a submit. Process the form data. -->
<!-- NOT a submit - display the form -->
<form ACTION="wiz1.rhtm" rb:marksession=yes
value="add" checked> </td>
(loadtime : 19ms)