Mercurial > hg > digilib-old
comparison webapp/doc/website/digilib-config.html @ 923:45effb9c9bed
more new documentation
author | robcast |
---|---|
date | Mon, 12 Dec 2011 20:37:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
922:8251cc7888fb | 923:45effb9c9bed |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 <head> | |
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
6 <title>digilib -- Digital Image Library</title> | |
7 </head> | |
8 <body> | |
9 <table border="0" cellspacing="0" cellpadding="10"> | |
10 <tr> | |
11 <td bgcolor="#a0a0a0"> </td> | |
12 <td> | |
13 <img src="images/digilib-logo-big.png" align="left" /> | |
14 <h1> | |
15 <tt>digilib</tt> -- a versatile image viewing environment for the internet | |
16 </h1> | |
17 </td> | |
18 </tr> | |
19 <tr> | |
20 <td bgcolor="#a0a0a0" valign="top" align="right"> | |
21 <p> | |
22 <b><a href="index.html">Info</a> </b> | |
23 </p> | |
24 <p> | |
25 <b><a href="http://developer.berlios.de/projects/digilib/">Project</a> </b> | |
26 </p> | |
27 <p> | |
28 <b><a href="http://developer.berlios.de/project/showfiles.php?group_id=251">Download</a> | |
29 </b> | |
30 </p> | |
31 <p> | |
32 <b><a href="docs.html">Docs</a></b> | |
33 <br /> | |
34 <a href="build-maven.html">Building</a> | |
35 <br /> | |
36 <a href="digilib-config.html">Configuring</a> | |
37 <br /> | |
38 <a href="http://developer.berlios.de/docman/?group_id=251">...more</a> | |
39 </p> | |
40 <p> | |
41 <b><a href="tips.html">Tips</a> </b> | |
42 </p> | |
43 <p> | |
44 <b><a href="http://hg.berlios.de/repos/digilib">Source</a> </b> | |
45 </p> | |
46 </td> | |
47 <td> | |
48 | |
49 <h1>Configuring digilib</h1> | |
50 | |
51 <h2>digilib-config.xml</h2> | |
52 | |
53 <p> | |
54 The main configuration for digilib is <code>digilib-config.xml</code> . It's | |
55 normally in the <code>WEB-INF</code> directory in the webapp. (If you really | |
56 need another location you can define it in the <code>config-file</code> | |
57 init-parameter to the servlet) | |
58 </p> | |
59 | |
60 <p>In the configuration file you can set several paths and options. The file | |
61 looks like this:</p> | |
62 | |
63 <pre> | |
64 <!-- Digilib servlet config file --> | |
65 | |
66 <digilib-config> | |
67 <!-- Image to be sent to indicate general failure. --> | |
68 <parameter name="error-image" value=<b>"/docuserver/images/icons/broken.gif"</b> /> | |
69 | |
70 <!-- Image to be sent to indicate authorization failure. --> | |
71 <parameter name="denied-image" value=<b>"/docuserver/images/icons/alert.red.gif"</b> /> | |
72 | |
73 <!-- List of directories where images are searched. | |
74 The authoritative directory with the high-resolution images | |
75 is first in list. --> | |
76 <parameter name="basedir-list" value=<b>"/docuserver/images:/docuserver/scaled/small"</b> /> | |
77 | |
78 <!-- Java class to use for image operations --> | |
79 <parameter name="docuimage-class" value="digilib.image.JAIDocuImage" /> | |
80 | |
81 <!-- mimimum amount of scaling done with antialiasing --> | |
82 <parameter name="subsample-minimum" value="2"/> | |
83 | |
84 <!-- default interpolation quality (0=worst) --> | |
85 <parameter name="default-quality" value="1"/> | |
86 | |
87 <!-- is sending whole image files with mo=file allowed? --> | |
88 <parameter name="sendfile-allowed" value="true" /> | |
89 | |
90 <!-- the a maximum size of any sent image. (0 means no limit) --> | |
91 <parameter name="max-image-size" value="0" /> | |
92 | |
93 <!-- number of working threads --> | |
94 <parameter name="worker-threads" value="2" /> | |
95 | |
96 <!-- number of waiting requests in queue --> | |
97 <parameter name="max-waiting-threads" value="20" /> | |
98 | |
99 <!-- Restrict access to authorized users. | |
100 User authentication and roles are provided by the servlet container | |
101 (see tomcat-users.xml). | |
102 Authorization for resources (directories) is evaluated by the servlet | |
103 (see auth-file). --> | |
104 <parameter name="use-authorization" value="true"/> | |
105 | |
106 <!-- Location of XML file with authorization requirements. --> | |
107 <parameter name="auth-file" value="digilib-auth.xml"/> | |
108 | |
109 <!-- Part of URL to indicate authenticated access to Tomcat. --> | |
110 <parameter name="auth-url-path" value="authenticated/"/> | |
111 | |
112 <!-- use mapping of "virtual directories" to real directories on the server --> | |
113 <parameter name="use-mapping" value="false"/> | |
114 | |
115 <!-- location of XML mapping file --> | |
116 <parameter name="mapping-file" value="digilib-map.xml"/> | |
117 | |
118 <!-- location of logger config file --> | |
119 <parameter name="log-config-file" value="log4j-config.xml"/> | |
120 </digilib-config> | |
121 </pre> | |
122 | |
123 <p> | |
124 You have to adjust the <code>basedir-list</code> parameter to the directories | |
125 where your images are installed. You need only one directory if you don't | |
126 provide prescaled low resolution versions of your images. The directory with the | |
127 high-resolution images must be the first entry in the list. | |
128 </p> | |
129 | |
130 <p>You can supply your own icons for the "error" and "access | |
131 denied" messages by the servlet. Standard images will be used if these | |
132 parameters are undefined.</p> | |
133 | |
134 <p> | |
135 You can specify the Java toolkit implementation with the <code>docuimage-class</code> | |
136 parameter. The <code>ImageLoaderDocuImage</code> usually gives best performance | |
137 and works with JDK 1.4 and up. | |
138 </p> | |
139 | |
140 | |
141 <h2>digilib-auth.xml</h2> | |
142 | |
143 <p> | |
144 The digilib access authorization is defined in the file defined by the <code>auth-file</code> | |
145 parameter (usually <code>digilib-auth.xml</code> in <code>WEB-INF</code> ). | |
146 </p> | |
147 | |
148 <p> | |
149 The file has two parts <code>diglib-paths</code> and <code>diglib-addresses</code> | |
150 . It looks like this: | |
151 </p> | |
152 | |
153 <pre> | |
154 <auth-config> | |
155 | |
156 <digilib-paths> | |
157 <!-- | |
158 A user must supply one of the roles under "role" | |
159 to access the directory "name". | |
160 Roles under "role" must be separated by comma only (no spaces). | |
161 --> | |
162 <path name="histast/eastwood-collection" role="eastwood-coll" /> | |
163 <path name="ptolemaios_geo" role="ptolemaios-geo" /> | |
164 </digilib-paths> | |
165 | |
166 <digilib-addresses> | |
167 <!-- | |
168 A computer with an ip address that matches "ip" | |
169 is automatically granted all roles under "role". | |
170 The ip address is matched from the left (in full quads). | |
171 Roles under "role" must be separated by comma only (no spaces). | |
172 --> | |
173 <address ip="127" role="local" /> | |
174 <address ip="130.92.68" role="eastwood-coll,ptolemaios-geo" /> | |
175 <address ip="130.92.151" role="ALL" /> | |
176 </digilib-addresses> | |
177 | |
178 </auth-config> | |
179 </pre> | |
180 | |
181 <p> | |
182 <code>diglib-paths</code> defines restricted directories and the roles needed | |
183 for access. The roles are defined with the users in <code>tomcat-users.xml</code> | |
184 (see above). All subdirectories of the given directories have the same | |
185 restrictions. All directories not listed here (and not subdirectories of listed | |
186 directories) are freely accessible. | |
187 </p> | |
188 | |
189 <p> | |
190 <code>diglib-addresses</code> defines hosts or networks of computers that are | |
191 automatically authenticated without username and password. Hosts can be assigned | |
192 roles. The special keyword <code>ALL</code> authorizes for everything. If the | |
193 role assigned to the computer is not sufficient to access a resource the user | |
194 will be asked for username and password. | |
195 </p> | |
196 | |
197 | |
198 | |
199 </td> | |
200 </tr> | |
201 <tr> | |
202 <td style="padding: 0px" align="left"> | |
203 <a href="http://developer.berlios.de"> <img | |
204 src="http://developer.berlios.de/bslogo.php?group_id=0&type=1" width="124" | |
205 height="32" border="0" alt="BerliOS Logo" /> | |
206 </a> | |
207 </td> | |
208 <td></td> | |
209 </tr> | |
210 </table> | |
211 | |
212 </body> | |
213 </html> |