ZimWeb has an administration tool - the ZIIAdmin servlet - which
can be used to administer ZimWeb, either from the web or from a
command line or script, which can be scheduled.
If you invoke the ZIIAdmin servlet from a web browser then you
will see a page with various parts under different headings:-
|
Database Status |
|
Allows you to
monitor, start and stop the Zim agent sessions e.g. if you want to
prevent access to the Zim application for maintenance purposes. |
|
Debug Status |
|
Indicates whether client debugging capability is enabled or disabled - press the adjacent button to toggle the status as necessary. |
|
Initialisation Parameters |
|
Shows the values of the startup parameters for the ZimWeb. |
|
XSLT Stylesheet cache |
|
Indicates the
current contents of the XSLT stylesheet cache. |
|
Page Template cache |
|
Indicates the
current contents of the page template cache. |
|
FOP driver pool |
|
Indicates the
current number of FOP (Apache Formatting Object Processor) driver
instances and the number checked out (in active use at the time
that you start the web-administration tool). |
The ZIIAdmin servlet can also be invoked from the
command line or by a script. The servlet itself requires two
parameters:-
action
- set to indicate what query or action the servlet is to perform.
Permitted actions include:-
conn-status - return the status of the Zim database
agent connections.
conn-start - attempt to start the Zim database agent
connections.
conn-stop - attempt to stop the Zim database agent
connections.
debug-status - return the debug capability
status.
debug-enable - enable the debug capability.
debug-disable - disable the debug capability.
clear-style-cache - clear the XSLT stylesheet
cache.
clear-page-template-cache - clear the page template
cache.
reset-xslfo-driver-pool - reset the XSL/FO driver
pool.
content - set to text so
that the servlet will return plain text instead of HTML.
To enable the servlet to be called from the command
line or a script, ZimWeb includes the CallURL utility to enable calls to a URL, with
BASIC authentication details if necessary.
The full syntax for CallURL is:
java -cp
<path>/zii.jar biz.zim.util.CallURL <URL> [
<username> <password> ]
... to invoke the URL <URL>, optionally with BASIC
authentication for user <username> and password
<password>.
(e.g. To start the database connections on a local
running ZimWeb installation or a default Tomcat installation, if
the ZimWeb file zii.jar is
in the current directory, and the ZimWeb administration servlet has
security requiring the username admin and password friend, you could use the
command:-
java -cp zii.jar
http://localhost:8080/ZII/servlet/ZIIAdmin?action=conn-start&content=text
admin friend)