Configuration and Application Plugin Files
At several stages of the page generation process callback functions can be plugged into the application server's main loop. The callbacks needs to be configured and defined. The configuration evaluation order is from generic to specific.
# Configuration files to define the static, default configuration: /maxscape/etc/maxscape.conf /maxscape/server/<application server>/etc/maxscape.conf # Application plugin files, defined by the static configuration, e.g.: /maxscape/lib/perl/Maxscape/SiteApplication.pm /maxscape/lib/perl/Maxscape/SiteApplication/Page.pm /maxscape/lib/perl/Maxscape/GlobalServerApplication.pm /maxscape/server/<application server>/lib/perl/Maxscape/ServerApplication.pm
Callbacks
Callbacks are used to plug application functions into the content generation loop.
- Initial Context Callback
- The initial context callback is executed before the content generation has started. This allows to select pages depending on the clients request. A typically usage is to adjust the context in dependency of the CGI environment. The callback needs to be configured and defined.
- Page not Found Callback
- This callback is executed, if no not found page is defined in the database.
- Final Filter Callback
- The filter can be used to post process a previously generated page.
- HTTP Header Callback
- This callback is executed after the HTTP request headers are read.
- Menu Callback
- This callback is executed directly after the $Menu object is created.
Element Callbacks
Element callback functions are executed immediately after the element database lookup or later by the output loop. They are bound to the element names and take the element attributes as callback parameters. Have a look at the file 'lib/perl/maXscape/SiteApplication/Page.pm' for more information on that.
Template Callbacks
Documentation to bee added...
Final Page Callback
After page content assembly, a final filter can be applied to the whole page. For example a regular expression or a server side (HTML, XML, ...) parser can be executed.
Page.NotFoundCallback
This callback is called when a non existing page is called and
no error document is defined in the 'application server's' database.
The function to be called can be configured via the 'Page.NotFoundCallback'
property of the global '$WebServer' object. If the 'Page.NotFoundCallback'
property is not defined the function 'main::DocumentNotFound' is called if
defined.
See the value for 'Page.NotFoundCallback' in the configuration module
to define a database error page.
| Next ∙ Previous ∙ Top ∙ Join ∙ Contact | © Maxscape |
