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">&nbsp;</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>
&lt;!-- Digilib servlet config file --&gt;

&lt;digilib-config&gt;
  &lt;!--  Image to be sent to indicate general failure. --&gt;
  &lt;parameter name=&quot;error-image&quot; value=<b>&quot;/docuserver/images/icons/broken.gif&quot;</b> /&gt;

  &lt;!--  Image to be sent to indicate authorization failure. --&gt;
  &lt;parameter name=&quot;denied-image&quot; value=<b>&quot;/docuserver/images/icons/alert.red.gif&quot;</b> /&gt;

  &lt;!-- List of directories where images are searched.
       The authoritative directory with the high-resolution images
       is first in list. --&gt;
  &lt;parameter name=&quot;basedir-list&quot; value=<b>&quot;/docuserver/images:/docuserver/scaled/small&quot;</b> /&gt;

  &lt;!-- Java class to use for image operations --&gt;
  &lt;parameter name=&quot;docuimage-class&quot; value=&quot;digilib.image.JAIDocuImage&quot; /&gt;

  &lt;!-- mimimum amount of scaling done with antialiasing --&gt;
  &lt;parameter name=&quot;subsample-minimum&quot; value=&quot;2&quot;/&gt;
  
  &lt;!-- default interpolation quality (0=worst) --&gt;
  &lt;parameter name=&quot;default-quality&quot; value=&quot;1&quot;/&gt;
  
  &lt;!-- is sending whole image files with mo=file allowed? --&gt;
  &lt;parameter name=&quot;sendfile-allowed&quot; value=&quot;true&quot; /&gt;

  &lt;!-- the a maximum size of any sent image. (0 means no limit) --&gt;
  &lt;parameter name=&quot;max-image-size&quot; value=&quot;0&quot; /&gt;

  &lt;!-- number of working threads --&gt;
  &lt;parameter name=&quot;worker-threads&quot; value=&quot;2&quot; /&gt;

  &lt;!-- number of waiting requests in queue --&gt;
  &lt;parameter name="max-waiting-threads" value="20" /&gt;

  &lt;!-- 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). --&gt;
  &lt;parameter name=&quot;use-authorization&quot; value=&quot;true&quot;/&gt;

  &lt;!-- Location of XML file with authorization requirements. --&gt;
  &lt;parameter name=&quot;auth-file&quot; value=&quot;digilib-auth.xml&quot;/&gt;

  &lt;!-- Part of URL to indicate authenticated access to Tomcat. --&gt;
  &lt;parameter name=&quot;auth-url-path&quot; value=&quot;authenticated/&quot;/&gt;

  &lt;!-- use mapping of &quot;virtual directories&quot; to real directories on the server --&gt;
  &lt;parameter name=&quot;use-mapping&quot; value=&quot;false&quot;/&gt;
  
  &lt;!-- location of XML mapping file --&gt;
  &lt;parameter name=&quot;mapping-file&quot; value=&quot;digilib-map.xml&quot;/&gt;
  
  &lt;!-- location of logger config file --&gt;
  &lt;parameter name=&quot;log-config-file&quot; value=&quot;log4j-config.xml&quot;/&gt;
&lt;/digilib-config&gt;
</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 &quot;error&quot; and &quot;access
          denied&quot; 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>
&lt;auth-config&gt;

  &lt;digilib-paths&gt;
    &lt;!-- 
      A user must supply one of the roles under &quot;role&quot;
      to access the directory &quot;name&quot;.
      Roles under &quot;role&quot; must be separated by comma only (no spaces).  
    --&gt;
    &lt;path name=&quot;histast/eastwood-collection&quot; role=&quot;eastwood-coll&quot; /&gt;
    &lt;path name=&quot;ptolemaios_geo&quot; role=&quot;ptolemaios-geo&quot; /&gt;
  &lt;/digilib-paths&gt;

  &lt;digilib-addresses&gt;
    &lt;!-- 
      A computer with an ip address that matches &quot;ip&quot;
      is automatically granted all roles under &quot;role&quot;.
      The ip address is matched from the left (in full quads).
      Roles under &quot;role&quot; must be separated by comma only (no spaces). 
    --&gt;
    &lt;address ip=&quot;127&quot; role=&quot;local&quot; /&gt;
    &lt;address ip=&quot;130.92.68&quot; role=&quot;eastwood-coll,ptolemaios-geo&quot; /&gt;
    &lt;address ip=&quot;130.92.151&quot; role=&quot;ALL&quot; /&gt;
  &lt;/digilib-addresses&gt;

&lt;/auth-config&gt;
</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>