Sav Z (Web Data) Server:

Web Developer's Guide

Consider steps that are needed to develop Web site exploring Z database.

1. Preparing Web pages

The outer tools are needed for preparing of Web pages. Database may contain references to the html|gif|jpeg|text|... files. It enables to use Z Web Data Server as wizard for navigation in WWW.

2. Creating tab files

See the Ex example directory and Object-relational possibilities. The .tab files are table data importable in Z database and may be created by the simple text editor. Table's first line describes schema of the data. Only the semicolon separates fields. If field text has special symbols, particularly one from the $ * # " ' { [ ( } ] ) ^ : / \ ~ = , ; < > , field text should be enclosed in the quotes, “ A: B ^ C; ”. It should be remembered that words started with #<digital>, or with $<letter> have specific use, that is, #<number> - numbered field, $<name> - specific field. The $<number> price may be without quotes, $10.2. Learning Z language will helpful for understanding of Z DBMS features and for farther database development.

Usually each table corresponds to the separate class level of the target objects. The tables of the whole class may not exceed 100000 bytes. It has to limit size of the deduced via WWW data.

3. Filling Z database

We need run Z Table converter and import the data tables in desktop variant of the database.
java [<options>] Sav.Z.Table [<table_options>] <database> <table_file> [<key_colon_number> [<colon_number> ...]]
Where:
<table_options> = -a[nalyse] | -r[ead]
Example:
java Sav.Z.Table Ex/Basic/Common Ex/Basic/DS.tab
or
java Sav.Z.Table -r Ex/Basic/Common.ass Ex/Basic/DS.tab 1 2 3 4 5 6
See and running createBase.bat in Ex/Basic example directory.

4. Testing clients’ interface in off-line mode

The standalone Web server from JSWDK 1.0.1 of Sun Microsystems is required.

Configuration

All the following files are placed in <JSWDK> by coping from SavZServer/Web directory.

webserver.xml, JSWDK server's configuration.

...
<WebServer id="webServer">
    <Service id="service0">
        ...
        <WebApplication id="zserver" mapping="/SavZServer" docBase="SavZServer"/>
    </Service>
</WebServer>
startserver.bat, Web server's start file.
...
set appClassPath=..\SavZServer\Lib\SavZS.jar;.\classes;%appJars%
...
servlets.properties, the servlet initialization parameters. File is located in <JSWDK>/SavZServer/WEB-INF. The dbName parameter sets name of Z database. The outLimit is byte limitation of data deduced from the database to the client.
zserver.code=Sav.Servlet.HTTPConnection
zserver.initparams=dbName=Common.ass,outLimit=100000
This files of <JSWDK>/SavZServer are used by the Web browser and may be adapted.
index.html, source file, defines frame of the Web browser dialog with Z Server.
ZServer.gif, label file, enables the aware users be oriented to the dialog features.
Blank.html, empty file, is needed only for clients with Netscape Navigator.
ValuesHelp.html, help for attribute values.
ViewHelp.html, help for table view.

If you go to the <JSWDK>/SavZServer/Data directory, you will look other files, Common.ass, page1.html and page2.html. Its are data of the Ex/Advanced example that you need make for your Web data server interface.
Common.ass Database, that defines the dialog.
*.html, *.gif, *.jpeg, *.txt, ... Web pages, database references to.

Starting Web server

See and start startserver.bat (Win32) or startserver (Unix).

Running Web browser

We can open http://localhost:8080/SavZServer/ source page after starting of the Web server and test a dialog in a Web browser. The character set of the Web browser must be agree with the system default character set of the server.

5. Executing Z Server in on-line mode

Please familiar with the servlet environment of your Web server and configure it with regard to the requirements of the previous section.