1 <!doctype linuxdoc system>
4 $Id: web.sgml,v 1.2 1996/06/06 10:34:34 adam Exp $
8 <title>Web/Z39.50 gateway guide
9 <author>Europagate, 1996
10 <date>$Revision: 1.2 $
12 This document describes a Web server that provides access to the
21 The EUROPAGATE project developed two Z39.50 gatways that served as
22 Z39.50 clients: an email gateway and a web gateway. This document
23 describes how to compile and install the web gateway. For information
24 about the email gateway see the document egate.txt.
29 An ANSI C compiler is required in order to compile the software.
31 The gateway uses IrTcl and YAZ from Index Data to interface the
34 YAZ and IrTcl can be found at the FTP host:
36 <htmlurl url="ftp://ftp.indexdata.dk/index/yaz"
37 name="ftp://ftp.indexdata.dk/index/yaz">
39 You also need the Tcl package which can be found at:
41 <htmlurl url="ftp://ftp.sunlabs.com/pub/tcl"
42 name="ftp://ftp.sunlabs.com/pub/tcl">
44 Unpack <tt>egate.tar.gz</tt> and edit the top level
45 <tt/Makefile/. Specify where the YAZ package can be found by setting
46 the the include path <tt/ZINC/, and the YAZ library <tt/ZLIB/.
47 Some systems need extra socket libraries - in this case set the
48 <tt/ELIB/ variable. You need also to define the location of Tcl:
49 <tt/TCLLIB/ and <tt/TCLINC/ - and the location of IrTcl:
50 <tt/IRTCLLIB/ and <tt/IRTCLINC/.
52 The gateway scripts and the Z39.50 communication tools are located
53 in the <tt/EGWDIR/ directory. This setting is hardcoded in the
54 CGI program (<tt/egwcgi/) and therefore it must be defined before
55 compiling. The CGI program, <tt/egwcgi/, will be installed in the
56 <tt/CGIDIR/ directory. HTML - and images files are installed in
57 the <tt/HTDOCS/ and the <tt/GIFDIR/ directories respectively.
59 The shell variables <tt/CC/ and <tt/CFLAGS/ are used by the
60 <tt/Makefile/ so you may modify these in your shell before compiling.
62 Now, type <tt/make web/
64 If the compilation succeeds, you should install the software in target
65 directories, by issuing: <tt/make install.web/.
67 A HTML file called <tt/egwindex.html/ should be installed in your
68 <tt/HTDOCS/ directory. The page contains miscellaneous starting links
69 to the Z39.50 gateway. Read it with your browser and click on the
70 <it>single target</it> button to test it out.
72 <sect>Overview of the system
75 <sect1>The <tt/egwcgi/ program.
77 The <tt/egwcgi/ program uses the CGI interface to communicate with
78 your HTTP server. It is the only program that communicates with your
79 server and it needs to be installed in your CGI binaries directory
82 The program inspects the URL and contacts a shell server
83 specified after the name of the CGI program.
84 The URL takes the form:
86 http://host/cgi-bin/egwcgi/shell/argument
88 where <it/shell/ is the name of the shell server to invoke. The
89 <it/argument/ is transferred to the <it/shell/ program.
91 When the <tt/egwcgi/ program is started by a URL as above, it will
92 assign a unique session-ID. If the shell wishes to be stateful it
93 should return a page that includes references with the newly
95 In this case all subsequent URLs should contain this session-ID
96 with the following form:
98 http://host/cgi-bin/egwcgi/sessionID/argument
100 The only difference from the initial URL is that the shell part is
101 substituted with a numeric session-ID. If the <tt/egwcgi/ program
102 gets a reference to this kind of URL, it will try to contact a running
103 shell. If that fails, it will restart it. To communicate with the
104 shell the <tt/egwcgi/ program uses FIFOs (names pipes) whose names
105 include the session-ID.
107 The <tt/egwcgi/ program will initially change its current directory
108 to <tt/EGWDIR/ as specified in the <tt/Makefile/.
110 <sect1>The shell system.
113 The shell system is, basically, a shell program, a few maintenance
114 files, and a set of scripts. All files in the shell system are stored
115 in the <tt/EGWDIR/ directory.
117 The files are summarized below:
120 <tag/egwtcl/ A Tcl shell server - reads HTML with embedded Tcl and
121 commands to inspect CGI variables. Note: this shell is currently
122 unused because this shell doesn't support Z39.50.
124 <tag/egwirtcl/ The IrTcl shell server. The IrTcl shell reads HTML
125 files with embedded Tcl scripts as well as Z39.50 extensions added by the
128 <tag/*.tcl/ Tcl scripts - located in the <tt/EGWDIR/ directory.
129 The <tt/z39util.tcl/ file declares a lot of Tcl functions to
130 facilitate Z39.50 communication as well as other utilities.
132 <tag/*.egw/ Web scripts with embedded Tcl - located in the <tt/EGWDIR/
133 directory. Normally, each script correspond to one type of Web
134 page. For example, the <tt/query.egw/ script contacts a single
135 target and displays a search form; the <tt/search.egw/ script
136 makes a Z39.50 search/present and displays the result.
138 <tag/ztargets.conf/ Target configuration file. A sort of profile is
139 defined for each target: the name of the target, record syntax,
140 search fields and mapping to bib-1, etc.
142 <tag/egw.res/ Small configuration file; defines a shell's idle time,
143 the log-level, and the directory for FIFOs used by the gateway.
146 When the system is running a number of files are created:
148 <tag/www.db/ Database that maps from session-IDs to shells.
150 <tag/tcl.state.*/ User session states; these are stored as Tcl
153 <tag/egwcgi_log/ Log file for the <tt/egwcgi/ program.
155 <tag/egwsh_log/ Log file for the shells <tt/egwtcl/, <tt/egwirtcl/, etc.
157 <tag/irtcl_log/ YAZ log file created by the IrTcl library. The file
158 only includes information about Z39.50 communication.
164 Copyright © 1995-1996, the EUROPAGATE consortium (see below).
166 The EUROPAGATE consortium members are:
169 <item>University College Dublin
170 <item>Danmarks Teknologiske Videnscenter
171 <item>An Chomhairle Leabharlanna
172 <item>Consejo Superior de Investigaciones Cientificas
175 Permission to use, copy, modify, distribute, and sell this software and
176 its documentation, in whole or in part, for any purpose, is hereby granted,
179 1. This copyright and permission notice appear in all copies of the
180 software and its documentation. Notices of copyright or attribution
181 which appear at the beginning of any file must remain unchanged.
183 2. The names of EUROPAGATE or the project partners may not be used to
184 endorse or promote products derived from this software without specific
185 prior written permission.
187 3. Users of this software (implementors and gateway operators) agree to
188 inform the EUROPAGATE consortium of their use of the software. This
189 information will be used to evaluate the EUROPAGATE project and the
190 software, and to plan further developments. The consortium may use
191 the information in later publications.
193 4. Users of this software agree to make their best efforts, when
194 documenting their use of the software, to acknowledge the EUROPAGATE
195 consortium, and the role played by the software in their work.
197 THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
198 EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
199 WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
200 IN NO EVENT SHALL THE EUROPAGATE CONSORTIUM OR ITS MEMBERS BE LIABLE
201 FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF
202 ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
203 OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND
204 ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
205 USE OR PERFORMANCE OF THIS SOFTWARE.