annotate client/doc/digilib_install.html @ 805:5591163f47ee stream

corrected typo. upped default quality.
author robcast
date Sat, 19 Feb 2011 22:59:53 +0100
parents c70a5016fdc5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
323
c70a5016fdc5 new doc
robcast
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
c70a5016fdc5 new doc
robcast
parents:
diff changeset
2 <html>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
3 <head>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
4 <title>Installation of digilib</title>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
5 </head>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
6
c70a5016fdc5 new doc
robcast
parents:
diff changeset
7 <body>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
8 <h1>What you need to install digilib</h1>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
9
c70a5016fdc5 new doc
robcast
parents:
diff changeset
10 <ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
11 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
12 <a href="http://java.sun.com/downloads/index.html" >Java JDK</a> &gt;1.2 (preferred 1.4 and up)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
13 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
14
c70a5016fdc5 new doc
robcast
parents:
diff changeset
15 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
16 <a href="http://jakarta.apache.org/tomcat/index.html" >Jakarta
c70a5016fdc5 new doc
robcast
parents:
diff changeset
17 Tomcat</a> version 4 or later (preferred 4.1 and up) from
c70a5016fdc5 new doc
robcast
parents:
diff changeset
18 <a href="http://jakarta.apache.org">http://jakarta.apache.org</a>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
19 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
20
c70a5016fdc5 new doc
robcast
parents:
diff changeset
21 <li>The digilib distribution package <a href="http://download.berlios.de/digilib/digilib-core.zip"><b>digilib-core.zip</b></a> (from
c70a5016fdc5 new doc
robcast
parents:
diff changeset
22 <a href="http://developer.berlios.de">http://developer.berlios.de</a>)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
23
c70a5016fdc5 new doc
robcast
parents:
diff changeset
24 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
25
c70a5016fdc5 new doc
robcast
parents:
diff changeset
26 <li>Some auxiliary Java libraries to be put in <code>digitallibrary/WEB-INF/lib</code> (can also be found in the <a href="http://download.berlios.de/digilib/digilib-ext.zip">digilib-ext.zip</a> package)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
27 <ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
28 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
29 <b>concurrent.jar</b> from Doug Lea's <a href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">util.concurrent library</a> (see <a href="http://gee.cs.oswego.edu/dl/">http://gee.cs.oswego.edu/dl/</a>).
c70a5016fdc5 new doc
robcast
parents:
diff changeset
30 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
31
c70a5016fdc5 new doc
robcast
parents:
diff changeset
32 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
33 <b>log4j.jar</b> from the <a href="http://logging.apache.org/log4j/docs/download.html">Log4J library</a> (see <a href="http://logging.apache.org">http://logging.apache.org</a>)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
34 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
35
c70a5016fdc5 new doc
robcast
parents:
diff changeset
36 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
37 <b>jai_imageio.jar</b> (and its native libraries) with JDK >= 1.4, from the <a href="http://java.sun.com/products/java-media/jai/current.html">Java Advanced Imaging Image-IO Tools</a> (see <a href="http://java.sun.com/products/java-media/jai/index.jsp">http://java.sun.com/products/java-media/jai/</a>)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
38 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
39
c70a5016fdc5 new doc
robcast
parents:
diff changeset
40 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
41 <b>jai_core.jar, jai_codec.jar</b> if you want to use the JAIDocuImage implementation, from the <a href="http://java.sun.com/products/java-media/jai/current.html">Java Advanced Imaging API</a> (see <a href="http://java.sun.com/products/java-media/jai/index.jsp">http://java.sun.com/products/java-media/jai/</a>)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
42 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
43
c70a5016fdc5 new doc
robcast
parents:
diff changeset
44 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
45 <b>batik-*.jar</b> if you want to use the Raster servlet, from the <a href="http://www.apache.org/dyn/closer.cgi/xml/batik">Apache Batik library</a> (see <a href="http://xml.apache.org/batik/">http://xml.apache.org/batik/</a>)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
46 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
47
c70a5016fdc5 new doc
robcast
parents:
diff changeset
48 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
49 <b>jena.jar</b> from the <a href="http://www.hpl.hp.com/semweb/jena1.htm">JENA RDF library version 1.6.1</a> (see <a href="http://jena.sourceforge.net/">http://jena.sourceforge.net/</a>)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
50 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
51 </ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
52 </ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
53
c70a5016fdc5 new doc
robcast
parents:
diff changeset
54 <h1>Installation</h1>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
55
c70a5016fdc5 new doc
robcast
parents:
diff changeset
56 <h2>On Linux/Unix</h2>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
57
c70a5016fdc5 new doc
robcast
parents:
diff changeset
58 <ol>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
59 <li>Make shure the Java JDK is installed (a JRE won't do).</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
60
c70a5016fdc5 new doc
robcast
parents:
diff changeset
61 <li>Create a base directory for digilib (the default used here is
c70a5016fdc5 new doc
robcast
parents:
diff changeset
62 <code>/docuserver</code>) and for the web interface
c70a5016fdc5 new doc
robcast
parents:
diff changeset
63 (<code>/docuserver/www</code>).</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
64
c70a5016fdc5 new doc
robcast
parents:
diff changeset
65 <li>Unpack the <b>digilib-core.zip</b> package in the web
c70a5016fdc5 new doc
robcast
parents:
diff changeset
66 interface directory (<code>/docuserver/www</code>). This will create
c70a5016fdc5 new doc
robcast
parents:
diff changeset
67 the digilib directory <code>digitallibrary</code>.</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
68
c70a5016fdc5 new doc
robcast
parents:
diff changeset
69 <li>Install the auxiliary Java libraries in
c70a5016fdc5 new doc
robcast
parents:
diff changeset
70 <code>digitallibrary/WEB-INF/lib</code>. (Or just unpack the
c70a5016fdc5 new doc
robcast
parents:
diff changeset
71 <b>digilib-ext.zip</b> package there.)</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
72
c70a5016fdc5 new doc
robcast
parents:
diff changeset
73 <li>Unpack Jakarta Tomcat 5.0.29 in <code>/docuserver</code> This should
c70a5016fdc5 new doc
robcast
parents:
diff changeset
74 produce a directory <code>/docuserver/jakarta-tomcat-5.0.29</code>. Create a
c70a5016fdc5 new doc
robcast
parents:
diff changeset
75 link <code>/docuserver/tomcat</code> to the new directory.</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
76
c70a5016fdc5 new doc
robcast
parents:
diff changeset
77 <li>Create a link from the digilib directory into the Tomcat webapps
c70a5016fdc5 new doc
robcast
parents:
diff changeset
78 directory <code>/docuserver/tomcat/webapps</code> (type <code>ln -s
c70a5016fdc5 new doc
robcast
parents:
diff changeset
79 /docuserver/www/digitallibrary /docuserver/tomcat/webapps/</code>) This installs
c70a5016fdc5 new doc
robcast
parents:
diff changeset
80 digilib in the default Tomcat instance running on port 8080 as
c70a5016fdc5 new doc
robcast
parents:
diff changeset
81 <code>http://myserver:8080/digitallibrary/</code>.</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
82
c70a5016fdc5 new doc
robcast
parents:
diff changeset
83 <li>Adjust the path to the JDK and its options in
c70a5016fdc5 new doc
robcast
parents:
diff changeset
84 <code>catalina.sh</code> (in the directory
c70a5016fdc5 new doc
robcast
parents:
diff changeset
85 <code>/docuserver/tomcat/bin</code>, see below for details)</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
86 </ol>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
87
c70a5016fdc5 new doc
robcast
parents:
diff changeset
88
c70a5016fdc5 new doc
robcast
parents:
diff changeset
89 <h2>On Windows (quick install)</h2>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
90
c70a5016fdc5 new doc
robcast
parents:
diff changeset
91 <ol>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
92 <li>Set the following Environment Variables:<br />
c70a5016fdc5 new doc
robcast
parents:
diff changeset
93 <code>CATALINA_HOME = C:\jakarta-tomcat-4.1.24</code> (or similar)<br />
c70a5016fdc5 new doc
robcast
parents:
diff changeset
94 <code>JAVA_HOME = C:\j2sdk</code> (or similar)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
95 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
96
c70a5016fdc5 new doc
robcast
parents:
diff changeset
97 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
98 Start Tomcat server: Open a console window (start <code>cmd.exe</code>).<br />
c70a5016fdc5 new doc
robcast
parents:
diff changeset
99 Type: <code>%CATALINA_HOME%\bin\startup</code>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
100 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
101
c70a5016fdc5 new doc
robcast
parents:
diff changeset
102 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
103 Try the following URL in your browser:
c70a5016fdc5 new doc
robcast
parents:
diff changeset
104 <code>http://localhost:8080</code> or
c70a5016fdc5 new doc
robcast
parents:
diff changeset
105 <code>http://127.0.0.1:8080</code>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
106 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
107
c70a5016fdc5 new doc
robcast
parents:
diff changeset
108 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
109 You should now be able to see the Tomcat opening screen: <em>If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!</em>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
110 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
111
c70a5016fdc5 new doc
robcast
parents:
diff changeset
112 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
113 Shut it down again: In the console window type <code>%CATALINA_HOME%\bin\shutdown</code>.
c70a5016fdc5 new doc
robcast
parents:
diff changeset
114 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
115
c70a5016fdc5 new doc
robcast
parents:
diff changeset
116 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
117 Extract the <b>diglib-core.zip</b> package, possibly to <code>C:\docuserver</code>.
c70a5016fdc5 new doc
robcast
parents:
diff changeset
118 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
119
c70a5016fdc5 new doc
robcast
parents:
diff changeset
120 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
121 Install the auxiliary Java libraries in <code>digitallibrary\WEB-INF\lib</code>.
c70a5016fdc5 new doc
robcast
parents:
diff changeset
122 (Or just unpack the <b>digilib-ext.zip</b> package there.)
c70a5016fdc5 new doc
robcast
parents:
diff changeset
123 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
124
c70a5016fdc5 new doc
robcast
parents:
diff changeset
125 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
126 Modify the following configuration files according to your paths (as in the &quot;On Linux&quot; section):
c70a5016fdc5 new doc
robcast
parents:
diff changeset
127 <br>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
128 For tomcat
c70a5016fdc5 new doc
robcast
parents:
diff changeset
129 <ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
130 <li><code>C:\jakarta-tomcat-4.1.24\conf\server.xml</code></li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
131 <li><code>C:\jakarta-tomcat-4.1.24\conf\tomcat-users.xml</code></li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
132 </ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
133 For digilib
c70a5016fdc5 new doc
robcast
parents:
diff changeset
134 <ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
135 <li><code>C:\docuserver\digitallibrary\WEB-INF\digilib-config.xml</code></li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
136 <li><code>C:\docuserver\digitallibrary\WEB-INF\digilib-auth.xml</code></li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
137 </ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
138 In the <code>alcatraz-win-conf.zip</code> package you can find
c70a5016fdc5 new doc
robcast
parents:
diff changeset
139 prepared configuration files with the following default values:
c70a5016fdc5 new doc
robcast
parents:
diff changeset
140 <ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
141 <li>The image file directory is <code>C:\bilder</code>. </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
142 <li>The username for viewing image files is <code>digilib</code>.</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
143 <li>The password for viewing image files is <code>digilib</code>.</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
144 <li>The digilib server runs on Port <code>9090</code>.</li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
145 </ul>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
146 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
147
c70a5016fdc5 new doc
robcast
parents:
diff changeset
148 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
149 Now you can restart the Tomcat server: <code>http://localhost:9090</code> or
c70a5016fdc5 new doc
robcast
parents:
diff changeset
150 <code>http://127.0.0.1:9090</code>.
c70a5016fdc5 new doc
robcast
parents:
diff changeset
151 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
152
c70a5016fdc5 new doc
robcast
parents:
diff changeset
153 <li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
154 Watch the images:
c70a5016fdc5 new doc
robcast
parents:
diff changeset
155 <a href="http://localhost:9090/docuserver/digitallibrary/digilib.jsp">http://localhost:9090/docuserver/digitallibrary/digilib.jsp</a>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
156 </li>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
157 </ol>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
158
c70a5016fdc5 new doc
robcast
parents:
diff changeset
159
c70a5016fdc5 new doc
robcast
parents:
diff changeset
160 <h1>Configuration</h1>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
161
c70a5016fdc5 new doc
robcast
parents:
diff changeset
162 <h2>Tomcat</h2>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
163
c70a5016fdc5 new doc
robcast
parents:
diff changeset
164 <h3>catalina.sh / catalina.bat</h3>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
165
c70a5016fdc5 new doc
robcast
parents:
diff changeset
166 <p>The file <code>catalina.sh</code> (in <code>/docuserver/tomcat/bin</code>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
167 can be modified to provide the path to the JDK and runtime options
c70a5016fdc5 new doc
robcast
parents:
diff changeset
168 for the Java VM. Somewhere at the beginning of the file you can put two lines
c70a5016fdc5 new doc
robcast
parents:
diff changeset
169 like this:</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
170
c70a5016fdc5 new doc
robcast
parents:
diff changeset
171 <pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
172 export JAVA_HOME=/usr/local/lib/IBMJava2-14
c70a5016fdc5 new doc
robcast
parents:
diff changeset
173 export CATALINA_OPTS="-mx512m"
c70a5016fdc5 new doc
robcast
parents:
diff changeset
174 </pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
175
c70a5016fdc5 new doc
robcast
parents:
diff changeset
176 <p>or, on Windows<p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
177
c70a5016fdc5 new doc
robcast
parents:
diff changeset
178 <pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
179 set CATALINA_HOME=C:\jakarta-tomcat-4.1.24
c70a5016fdc5 new doc
robcast
parents:
diff changeset
180 set JAVA_HOME=C:\j2sdk
c70a5016fdc5 new doc
robcast
parents:
diff changeset
181 </pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
182
c70a5016fdc5 new doc
robcast
parents:
diff changeset
183 <p>Adjust the <code>JAVA_HOME</code> path to point to your Java JDK
c70a5016fdc5 new doc
robcast
parents:
diff changeset
184 installation directory. You can adjust the memory used by the Java VM
c70a5016fdc5 new doc
robcast
parents:
diff changeset
185 with the <code>-mx</code> option.</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
186
c70a5016fdc5 new doc
robcast
parents:
diff changeset
187
c70a5016fdc5 new doc
robcast
parents:
diff changeset
188 <h3>tomcat-users.xml</h3>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
189
c70a5016fdc5 new doc
robcast
parents:
diff changeset
190 <p>All passwords and usernames have to be set up in the file
c70a5016fdc5 new doc
robcast
parents:
diff changeset
191 <code>tomcat-users.xml</code> in <code>/docuserver/tomcat/conf</code> if you
c70a5016fdc5 new doc
robcast
parents:
diff changeset
192 want to use authentication in digilib. The file looks like this:</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
193
c70a5016fdc5 new doc
robcast
parents:
diff changeset
194 <pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
195 &lt;tomcat-users&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
196 &lt;user name="tomcat" password="tomcat" roles="tomcat" /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
197 &lt;user name="role1" password="tomcat" roles="role1" /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
198 &lt;user name="both" password="tomcat" roles="tomcat,role1" /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
199 &lt;/tomcat-users&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
200 </pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
201
c70a5016fdc5 new doc
robcast
parents:
diff changeset
202 <p>A user is identified by a <code>name</code> and
c70a5016fdc5 new doc
robcast
parents:
diff changeset
203 <code>password</code>. These two elements have to be entered in a
c70a5016fdc5 new doc
robcast
parents:
diff changeset
204 authentication form presented by the browser when accessing a
c70a5016fdc5 new doc
robcast
parents:
diff changeset
205 restricted resource. A user can have one or more
c70a5016fdc5 new doc
robcast
parents:
diff changeset
206 <code>roles</code>. These roles will be used by digilib to decide if
c70a5016fdc5 new doc
robcast
parents:
diff changeset
207 an authenticated user is allowed to access a document (see
c70a5016fdc5 new doc
robcast
parents:
diff changeset
208 <code>digilib-auth.xml</code> below).</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
209
c70a5016fdc5 new doc
robcast
parents:
diff changeset
210 <p>If you want to use the webinterface to configure Tomcat, you have to
c70a5016fdc5 new doc
robcast
parents:
diff changeset
211 add administrational account with the roles <code>admin</code> and
c70a5016fdc5 new doc
robcast
parents:
diff changeset
212 <code>manager</code>.</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
213
c70a5016fdc5 new doc
robcast
parents:
diff changeset
214 <p>tomcat has to be restarted before changes to
c70a5016fdc5 new doc
robcast
parents:
diff changeset
215 <code>tomcat-users.xml</code> have effect!</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
216
c70a5016fdc5 new doc
robcast
parents:
diff changeset
217
c70a5016fdc5 new doc
robcast
parents:
diff changeset
218 <h2>Digilib</h2>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
219
c70a5016fdc5 new doc
robcast
parents:
diff changeset
220 <h3>digilib-config.xml</h3>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
221
c70a5016fdc5 new doc
robcast
parents:
diff changeset
222 <p>The main configuration for digilib is
c70a5016fdc5 new doc
robcast
parents:
diff changeset
223 <code>digilib-config.xml</code>. It's normally in the
c70a5016fdc5 new doc
robcast
parents:
diff changeset
224 <code>WEB-INF</code> directory in the webapp. (If you really need
c70a5016fdc5 new doc
robcast
parents:
diff changeset
225 another location you can define it in the <code>config-file</code>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
226 init-parameter to the servlet)</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
227
c70a5016fdc5 new doc
robcast
parents:
diff changeset
228 <p>In the configuration file you can set several paths and
c70a5016fdc5 new doc
robcast
parents:
diff changeset
229 options. The file looks like this:</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
230
c70a5016fdc5 new doc
robcast
parents:
diff changeset
231 <pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
232 &lt;!-- Digilib servlet config file --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
233
c70a5016fdc5 new doc
robcast
parents:
diff changeset
234 &lt;digilib-config&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
235 &lt;!-- Image to be sent to indicate general failure. --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
236 &lt;parameter name=&quot;error-image&quot; value=<b>&quot;/docuserver/images/icons/broken.gif&quot;</b> /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
237
c70a5016fdc5 new doc
robcast
parents:
diff changeset
238 &lt;!-- Image to be sent to indicate authorization failure. --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
239 &lt;parameter name=&quot;denied-image&quot; value=<b>&quot;/docuserver/images/icons/alert.red.gif&quot;</b> /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
240
c70a5016fdc5 new doc
robcast
parents:
diff changeset
241 &lt;!-- List of directories where images are searched.
c70a5016fdc5 new doc
robcast
parents:
diff changeset
242 The authoritative directory with the high-resolution images
c70a5016fdc5 new doc
robcast
parents:
diff changeset
243 is first in list. --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
244 &lt;parameter name=&quot;basedir-list&quot; value=<b>&quot;/docuserver/images:/docuserver/scaled/small&quot;</b> /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
245
c70a5016fdc5 new doc
robcast
parents:
diff changeset
246 &lt;!-- Java class to use for image operations --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
247 &lt;parameter name=&quot;docuimage-class&quot; value=&quot;digilib.image.JAIDocuImage&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
248
c70a5016fdc5 new doc
robcast
parents:
diff changeset
249 &lt;!-- mimimum amount of scaling done with antialiasing --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
250 &lt;parameter name=&quot;subsample-minimum&quot; value=&quot;2&quot;/&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
251
c70a5016fdc5 new doc
robcast
parents:
diff changeset
252 &lt;!-- default interpolation quality (0=worst) --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
253 &lt;parameter name=&quot;default-quality&quot; value=&quot;1&quot;/&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
254
c70a5016fdc5 new doc
robcast
parents:
diff changeset
255 &lt;!-- is sending whole image files with mo=file allowed? --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
256 &lt;parameter name=&quot;sendfile-allowed&quot; value=&quot;true&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
257
c70a5016fdc5 new doc
robcast
parents:
diff changeset
258 &lt;!-- the a maximum size of any sent image. (0 means no limit) --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
259 &lt;parameter name=&quot;max-image-size&quot; value=&quot;0&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
260
c70a5016fdc5 new doc
robcast
parents:
diff changeset
261 &lt;!-- use safe but slow directory indexing --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
262 &lt;parameter name=&quot;safe-dir-index&quot; value=&quot;false&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
263
c70a5016fdc5 new doc
robcast
parents:
diff changeset
264 &lt;!-- number of working threads --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
265 &lt;parameter name=&quot;worker-threads&quot; value=&quot;2&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
266
c70a5016fdc5 new doc
robcast
parents:
diff changeset
267 &lt;!-- Restrict access to authorized users.
c70a5016fdc5 new doc
robcast
parents:
diff changeset
268 User authentication and roles are provided by the servlet container
c70a5016fdc5 new doc
robcast
parents:
diff changeset
269 (see tomcat-users.xml).
c70a5016fdc5 new doc
robcast
parents:
diff changeset
270 Authorization for resources (directories) is evaluated by the servlet
c70a5016fdc5 new doc
robcast
parents:
diff changeset
271 (see auth-file). --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
272 &lt;parameter name=&quot;use-authorization&quot; value=&quot;true&quot;/&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
273
c70a5016fdc5 new doc
robcast
parents:
diff changeset
274 &lt;!-- Location of XML file with authorization requirements. --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
275 &lt;parameter name=&quot;auth-file&quot; value=&quot;digilib-auth.xml&quot;/&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
276
c70a5016fdc5 new doc
robcast
parents:
diff changeset
277 &lt;!-- Part of URL to indicate authenticated access to Tomcat. --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
278 &lt;parameter name=&quot;auth-url-path&quot; value=&quot;authenticated/&quot;/&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
279
c70a5016fdc5 new doc
robcast
parents:
diff changeset
280 &lt;!-- use mapping of &quot;virtual directories&quot; to real directories on the server --
c70a5016fdc5 new doc
robcast
parents:
diff changeset
281 &gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
282 &lt;parameter name=&quot;use-mapping&quot; value=&quot;false&quot;/&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
283
c70a5016fdc5 new doc
robcast
parents:
diff changeset
284 &lt;!-- location of XML mapping file --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
285 &lt;parameter name=&quot;mapping-file&quot; value=&quot;digilib-map.xml&quot;/&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
286
c70a5016fdc5 new doc
robcast
parents:
diff changeset
287 &lt;!-- location of logger config file --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
288 &lt;parameter name=&quot;log-config-file&quot; value=&quot;log4j-config.xml&quot;/&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
289 &lt;/digilib-config&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
290 </pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
291
c70a5016fdc5 new doc
robcast
parents:
diff changeset
292 <p>You have to adjust the <code>basedir-list</code> parameter to the
c70a5016fdc5 new doc
robcast
parents:
diff changeset
293 directories where your images are installed. You need only one
c70a5016fdc5 new doc
robcast
parents:
diff changeset
294 directory if you don't provide prescaled low resolution versions of your
c70a5016fdc5 new doc
robcast
parents:
diff changeset
295 images. The directory with the high-resolution images must be the
c70a5016fdc5 new doc
robcast
parents:
diff changeset
296 first entry in the list.</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
297
c70a5016fdc5 new doc
robcast
parents:
diff changeset
298 <p>You can supply your own icons for the &quot;error&quot; and
c70a5016fdc5 new doc
robcast
parents:
diff changeset
299 &quot;access denied&quot; messages by the servlet. Standard images
c70a5016fdc5 new doc
robcast
parents:
diff changeset
300 will be used if these parameters are undefined.</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
301
c70a5016fdc5 new doc
robcast
parents:
diff changeset
302 <p>You can specify the Java toolkit implementation with the
c70a5016fdc5 new doc
robcast
parents:
diff changeset
303 <code>docuimage-class</code> parameter. The
c70a5016fdc5 new doc
robcast
parents:
diff changeset
304 <code>ImageLoaderDocuImage</code> might give best performance but
c70a5016fdc5 new doc
robcast
parents:
diff changeset
305 works only with JDK 1.4 and up. <code>JAIDocuImage</code> works with
c70a5016fdc5 new doc
robcast
parents:
diff changeset
306 JDK 1.3 and up.</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
307
c70a5016fdc5 new doc
robcast
parents:
diff changeset
308
c70a5016fdc5 new doc
robcast
parents:
diff changeset
309 <h3>digilib-auth.xml</h3>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
310
c70a5016fdc5 new doc
robcast
parents:
diff changeset
311 <p>The digilib access authorization is defined in the file defined by
c70a5016fdc5 new doc
robcast
parents:
diff changeset
312 the <code>auth-file</code> parameter (usually
c70a5016fdc5 new doc
robcast
parents:
diff changeset
313 <code>digilib-auth.xml</code> in <code>WEB-INF</code>). </p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
314
c70a5016fdc5 new doc
robcast
parents:
diff changeset
315 <p>The file has two parts <code>diglib-paths</code> and
c70a5016fdc5 new doc
robcast
parents:
diff changeset
316 <code>diglib-addresses</code>. It looks like this:</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
317
c70a5016fdc5 new doc
robcast
parents:
diff changeset
318 <pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
319 &lt;auth-config&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
320
c70a5016fdc5 new doc
robcast
parents:
diff changeset
321 &lt;digilib-paths&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
322 &lt;!--
c70a5016fdc5 new doc
robcast
parents:
diff changeset
323 A user must supply one of the roles under &quot;role&quot;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
324 to access the directory &quot;name&quot;.
c70a5016fdc5 new doc
robcast
parents:
diff changeset
325 Roles under &quot;role&quot; must be separated by comma only (no spaces).
c70a5016fdc5 new doc
robcast
parents:
diff changeset
326 --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
327 &lt;path name=&quot;histast/eastwood-collection&quot; role=&quot;eastwood-coll&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
328 &lt;path name=&quot;ptolemaios_geo&quot; role=&quot;ptolemaios-geo&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
329 &lt;/digilib-paths&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
330
c70a5016fdc5 new doc
robcast
parents:
diff changeset
331 &lt;digilib-addresses&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
332 &lt;!--
c70a5016fdc5 new doc
robcast
parents:
diff changeset
333 A computer with an ip address that matches &quot;ip&quot;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
334 is automatically granted all roles under &quot;role&quot;.
c70a5016fdc5 new doc
robcast
parents:
diff changeset
335 The ip address is matched from the left (in full quads).
c70a5016fdc5 new doc
robcast
parents:
diff changeset
336 Roles under &quot;role&quot; must be separated by comma only (no spaces).
c70a5016fdc5 new doc
robcast
parents:
diff changeset
337 --&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
338 &lt;address ip=&quot;127&quot; role=&quot;local&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
339 &lt;address ip=&quot;130.92.68&quot; role=&quot;eastwood-coll,ptolemaios-geo&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
340 &lt;address ip=&quot;130.92.151&quot; role=&quot;ALL&quot; /&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
341 &lt;/digilib-addresses&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
342
c70a5016fdc5 new doc
robcast
parents:
diff changeset
343 &lt;/auth-config&gt;
c70a5016fdc5 new doc
robcast
parents:
diff changeset
344 </pre>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
345
c70a5016fdc5 new doc
robcast
parents:
diff changeset
346 <p><code>diglib-paths</code> defines restricted directories and
c70a5016fdc5 new doc
robcast
parents:
diff changeset
347 the roles needed for access. The roles are defined with the users in
c70a5016fdc5 new doc
robcast
parents:
diff changeset
348 <code>tomcat-users.xml</code> (see above). All subdirectories of the
c70a5016fdc5 new doc
robcast
parents:
diff changeset
349 given directories have the same restrictions. All directories not
c70a5016fdc5 new doc
robcast
parents:
diff changeset
350 listed here (and not subdirectories of listed directories) are freely
c70a5016fdc5 new doc
robcast
parents:
diff changeset
351 accessible.</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
352
c70a5016fdc5 new doc
robcast
parents:
diff changeset
353 <p><code>diglib-addresses</code> defines hosts or networks of
c70a5016fdc5 new doc
robcast
parents:
diff changeset
354 computers that are automatically authenticated without username and
c70a5016fdc5 new doc
robcast
parents:
diff changeset
355 password. Hosts can be assigned roles. The special keyword <code>ALL</code>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
356 authorizes for everything. If the role assigned to the computer is not
c70a5016fdc5 new doc
robcast
parents:
diff changeset
357 sufficient to access a resource the user will be asked for username
c70a5016fdc5 new doc
robcast
parents:
diff changeset
358 and password.</p>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
359
c70a5016fdc5 new doc
robcast
parents:
diff changeset
360
c70a5016fdc5 new doc
robcast
parents:
diff changeset
361
c70a5016fdc5 new doc
robcast
parents:
diff changeset
362 <hr>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
363 <address>robcast@mail.berlios.de</address>
c70a5016fdc5 new doc
robcast
parents:
diff changeset
364 <!-- hhmts start -->Last modified: Tue Nov 2 13:14:57 CET 2004 <!-- hhmts end -->
c70a5016fdc5 new doc
robcast
parents:
diff changeset
365 </body> </html>