annotate client/doc/digilib_install.html @ 644:bffc7d8c3641 jquery

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