annotate webapp/doc/digilib_install.html @ 1061:4f5c5c578aa4

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