Mercurial > hg > digilib-old
view webapp/doc/website/digilib-config.html @ 1134:cd594aa261ec
fix defineArea bug in IE; reintroduce CSS opacity filters for IE 6-8
author | hertzhaft |
---|---|
date | Tue, 13 Nov 2012 20:18:11 +0100 |
parents | 45effb9c9bed |
children |
line wrap: on
line source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>digilib -- Digital Image Library</title> </head> <body> <table border="0" cellspacing="0" cellpadding="10"> <tr> <td bgcolor="#a0a0a0"> </td> <td> <img src="images/digilib-logo-big.png" align="left" /> <h1> <tt>digilib</tt> -- a versatile image viewing environment for the internet </h1> </td> </tr> <tr> <td bgcolor="#a0a0a0" valign="top" align="right"> <p> <b><a href="index.html">Info</a> </b> </p> <p> <b><a href="http://developer.berlios.de/projects/digilib/">Project</a> </b> </p> <p> <b><a href="http://developer.berlios.de/project/showfiles.php?group_id=251">Download</a> </b> </p> <p> <b><a href="docs.html">Docs</a></b> <br /> <a href="build-maven.html">Building</a> <br /> <a href="digilib-config.html">Configuring</a> <br /> <a href="http://developer.berlios.de/docman/?group_id=251">...more</a> </p> <p> <b><a href="tips.html">Tips</a> </b> </p> <p> <b><a href="http://hg.berlios.de/repos/digilib">Source</a> </b> </p> </td> <td> <h1>Configuring digilib</h1> <h2>digilib-config.xml</h2> <p> The main configuration for digilib is <code>digilib-config.xml</code> . It's normally in the <code>WEB-INF</code> directory in the webapp. (If you really need another location you can define it in the <code>config-file</code> init-parameter to the servlet) </p> <p>In the configuration file you can set several paths and options. The file looks like this:</p> <pre> <!-- Digilib servlet config file --> <digilib-config> <!-- Image to be sent to indicate general failure. --> <parameter name="error-image" value=<b>"/docuserver/images/icons/broken.gif"</b> /> <!-- Image to be sent to indicate authorization failure. --> <parameter name="denied-image" value=<b>"/docuserver/images/icons/alert.red.gif"</b> /> <!-- List of directories where images are searched. The authoritative directory with the high-resolution images is first in list. --> <parameter name="basedir-list" value=<b>"/docuserver/images:/docuserver/scaled/small"</b> /> <!-- Java class to use for image operations --> <parameter name="docuimage-class" value="digilib.image.JAIDocuImage" /> <!-- mimimum amount of scaling done with antialiasing --> <parameter name="subsample-minimum" value="2"/> <!-- default interpolation quality (0=worst) --> <parameter name="default-quality" value="1"/> <!-- is sending whole image files with mo=file allowed? --> <parameter name="sendfile-allowed" value="true" /> <!-- the a maximum size of any sent image. (0 means no limit) --> <parameter name="max-image-size" value="0" /> <!-- number of working threads --> <parameter name="worker-threads" value="2" /> <!-- number of waiting requests in queue --> <parameter name="max-waiting-threads" value="20" /> <!-- Restrict access to authorized users. User authentication and roles are provided by the servlet container (see tomcat-users.xml). Authorization for resources (directories) is evaluated by the servlet (see auth-file). --> <parameter name="use-authorization" value="true"/> <!-- Location of XML file with authorization requirements. --> <parameter name="auth-file" value="digilib-auth.xml"/> <!-- Part of URL to indicate authenticated access to Tomcat. --> <parameter name="auth-url-path" value="authenticated/"/> <!-- use mapping of "virtual directories" to real directories on the server --> <parameter name="use-mapping" value="false"/> <!-- location of XML mapping file --> <parameter name="mapping-file" value="digilib-map.xml"/> <!-- location of logger config file --> <parameter name="log-config-file" value="log4j-config.xml"/> </digilib-config> </pre> <p> You have to adjust the <code>basedir-list</code> parameter to the directories where your images are installed. You need only one directory if you don't provide prescaled low resolution versions of your images. The directory with the high-resolution images must be the first entry in the list. </p> <p>You can supply your own icons for the "error" and "access denied" messages by the servlet. Standard images will be used if these parameters are undefined.</p> <p> You can specify the Java toolkit implementation with the <code>docuimage-class</code> parameter. The <code>ImageLoaderDocuImage</code> usually gives best performance and works with JDK 1.4 and up. </p> <h2>digilib-auth.xml</h2> <p> The digilib access authorization is defined in the file defined by the <code>auth-file</code> parameter (usually <code>digilib-auth.xml</code> in <code>WEB-INF</code> ). </p> <p> The file has two parts <code>diglib-paths</code> and <code>diglib-addresses</code> . It looks like this: </p> <pre> <auth-config> <digilib-paths> <!-- A user must supply one of the roles under "role" to access the directory "name". Roles under "role" must be separated by comma only (no spaces). --> <path name="histast/eastwood-collection" role="eastwood-coll" /> <path name="ptolemaios_geo" role="ptolemaios-geo" /> </digilib-paths> <digilib-addresses> <!-- A computer with an ip address that matches "ip" is automatically granted all roles under "role". The ip address is matched from the left (in full quads). Roles under "role" must be separated by comma only (no spaces). --> <address ip="127" role="local" /> <address ip="130.92.68" role="eastwood-coll,ptolemaios-geo" /> <address ip="130.92.151" role="ALL" /> </digilib-addresses> </auth-config> </pre> <p> <code>diglib-paths</code> defines restricted directories and the roles needed for access. The roles are defined with the users in <code>tomcat-users.xml</code> (see above). All subdirectories of the given directories have the same restrictions. All directories not listed here (and not subdirectories of listed directories) are freely accessible. </p> <p> <code>diglib-addresses</code> defines hosts or networks of computers that are automatically authenticated without username and password. Hosts can be assigned roles. The special keyword <code>ALL</code> authorizes for everything. If the role assigned to the computer is not sufficient to access a resource the user will be asked for username and password. </p> </td> </tr> <tr> <td style="padding: 0px" align="left"> <a href="http://developer.berlios.de"> <img src="http://developer.berlios.de/bslogo.php?group_id=0&type=1" width="124" height="32" border="0" alt="BerliOS Logo" /> </a> </td> <td></td> </tr> </table> </body> </html>