# HG changeset patch # User robcast # Date 1323718673 -3600 # Node ID 9a472dab7e09b9f26e83267f42b7e3ba58895231 # Parent 8abbc40d0df5a6ab55d61598354464c3fa050fc8 more new documentation diff -r 8abbc40d0df5 -r 9a472dab7e09 website/build-maven.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/website/build-maven.html Mon Dec 12 20:37:53 2011 +0100 @@ -0,0 +1,170 @@ + + + + +digilib -- Digital Image Library + + + + + + + + + + + + + + + + +
  + +

+ digilib -- a versatile image viewing environment for the internet +

+
+

+ Info +

+

+ Project +

+

+ Download +

+

+ Docs +
+ Building +
+ Configuring +
+ ...more +

+

+ Tips +

+

+ Source +

+
+ +

Building digilib with Maven

+ +

+ The easiest way to get the latest and greatest digilib is the Maven build tool. It will download, + compile, and install the latest digilib version and all required libraries. +

+ +

What you need

+
    +
  • + Java (1.5 or higher) +
  • +
  • + Maven +
  • +
  • + Mercurial +
  • +
  • + The digilib project file pom.xml + (download and save it) +
  • +
  • + A Servlet container like Tomcat or Jetty to run the web application. +
  • +
+ +

Quick build

+ +

+ The fastest way to build the digilib web application is to run +

mvn scm:bootstrap -N
+ in the same directory as the pom.xml file you downloaded. +

+

+ This will create a web application directory digilib-webapp-2.0-SNAPSHOT + and a WAR file digilib-webapp-2.0-SNAPSHOT-srv2.war (or similar) in + the subdirectory target/checkout/webapp/target/ +

+

+ If you want to use the new-and-better Asynchronous Servlet API add -Psrv3 + to the Maven command line above. You will need Java version 6 and Tomcat version 7 or Jetty version + 8 or later to use the asynchronous Servlet. +

+ +

Deploying the web application by hand

+ +

+ To deploy digilib just copy the web application directory into the webapp + directory of the Servlet container. +

+ +

+ Since the URL of your digilib server starts with the name of the web application + and the name of the web application is derived from the name of the web + application directory please rename the web application directory to digitallibrary + before you start + +

+

+ Then you should see your digilib running at the URL http://localhost:8080/digitallibrary/jquery/digilib.html +

+ +

Configuring digilib

+ +

+ To change the configuration of digilib just edit the file digilib-config.xml + in the web application directory (digitallibrary/WEB-INF/digilib-config.xml). + Documentation of the configuration options is here. +

+ +

+ You can see a summary of your running digilib configuration at the URL http://localhost:8080/digitallibrary/server/dlConfig.jsp +

+ + +

Developer build

+ +

If you are developing with digilib it is helpful to check out the source + code separately so you can keep it around, modify it or change the configuration + before you deploy.

+

+ To check out the latest source code into the directory digilib run +

mvn scm:checkout -N -DcheckoutDirectory=digilib
+ in the same directory as the pom.xml file you downloaded. +

+

+ The digilib configuration files are now in webapp/src/main/webapp/WEB-INF/ +

+

+ To build the resulting source code, change into the digilib + directory you checked out above and run +

mvn package
+ This will create a web application directory digilib-webapp-2.0-SNAPSHOT + and a WAR file digilib-webapp-2.0-SNAPSHOT-srv2.war (or similar) in + the subdirectory webapp/target/ . +

+

+ If you want to use the new-and-better Asynchronous Servlet API add -Psrv3 + to the Maven command line above. You will need Java version 6 and Tomcat version 7 or Jetty version + 8 or later to use the asynchronous Servlet. +

+
+ BerliOS Logo + +
+ + + diff -r 8abbc40d0df5 -r 9a472dab7e09 website/digilib-config.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/website/digilib-config.html Mon Dec 12 20:37:53 2011 +0100 @@ -0,0 +1,213 @@ + + + + +digilib -- Digital Image Library + + + + + + + + + + + + + + + +
  + +

+ digilib -- a versatile image viewing environment for the internet +

+
+

+ Info +

+

+ Project +

+

+ Download + +

+

+ Docs +
+ Building +
+ Configuring +
+ ...more +

+

+ Tips +

+

+ Source +

+
+ +

Configuring digilib

+ +

digilib-config.xml

+ +

+ The main configuration for digilib is digilib-config.xml . It's + normally in the WEB-INF directory in the webapp. (If you really + need another location you can define it in the config-file + init-parameter to the servlet) +

+ +

In the configuration file you can set several paths and options. The file + looks like this:

+ +
+<!-- Digilib servlet config file -->
+
+<digilib-config>
+  <!--  Image to be sent to indicate general failure. -->
+  <parameter name="error-image" value="/docuserver/images/icons/broken.gif" />
+
+  <!--  Image to be sent to indicate authorization failure. -->
+  <parameter name="denied-image" value="/docuserver/images/icons/alert.red.gif" />
+
+  <!-- List of directories where images are searched.
+       The authoritative directory with the high-resolution images
+       is first in list. -->
+  <parameter name="basedir-list" value="/docuserver/images:/docuserver/scaled/small" />
+
+  <!-- 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>
+
+ +

+ You have to adjust the basedir-list 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. +

+ +

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.

+ +

+ You can specify the Java toolkit implementation with the docuimage-class + parameter. The ImageLoaderDocuImage usually gives best performance + and works with JDK 1.4 and up. +

+ + +

digilib-auth.xml

+ +

+ The digilib access authorization is defined in the file defined by the auth-file + parameter (usually digilib-auth.xml in WEB-INF ). +

+ +

+ The file has two parts diglib-paths and diglib-addresses + . It looks like this: +

+ +
+<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>
+
+ +

+ diglib-paths defines restricted directories and the roles needed + for access. The roles are defined with the users in tomcat-users.xml + (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. +

+ +

+ diglib-addresses defines hosts or networks of computers that are + automatically authenticated without username and password. Hosts can be assigned + roles. The special keyword ALL 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. +

+ + + +
+ BerliOS Logo + +
+ + + \ No newline at end of file diff -r 8abbc40d0df5 -r 9a472dab7e09 website/docs.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/website/docs.html Mon Dec 12 20:37:53 2011 +0100 @@ -0,0 +1,79 @@ + + + + +digilib -- Digital Image Library + + + + + + + + + + + + + + + + +
  + +

+ digilib -- a versatile image viewing environment for the internet +

+
+

+ Info +

+

+ Project +

+

+ Download +

+

+ Docs +
+ Building +
+ Configuring +
+ ...more +

+

+ Tips +

+

+ Source +

+
+ +

digilib documentation

+ +

+ Building digilib with Maven +

+

+ Configuring digilib +

+

+ ...more + documentation (installing ready-built digilib, digilib web API, etc.) +

+

+ Tips for running digilib (Java memory settings, using + prescaled images, etc.) +

+
+ BerliOS Logo + +
+ + + diff -r 8abbc40d0df5 -r 9a472dab7e09 website/index.html --- a/website/index.html Fri Dec 09 20:33:24 2011 +0100 +++ b/website/index.html Mon Dec 12 20:37:53 2011 +0100 @@ -13,8 +13,7 @@

- digilib - -- a versatile image viewing environment for the internet + digilib -- a versatile image viewing environment for the internet

@@ -30,7 +29,13 @@ Download

- Docs + Docs +
+ Building +
+ Configuring +
+ ...more

Tips @@ -45,6 +50,12 @@

News

+
12.12.2011
+
+ New documentation: How to build and install + the latest digilib with Maven. +
+
25.5.2011
Special offer of the day: latest @@ -59,7 +70,8 @@ A new File release (1.8.3). Much internal code has been rewritten and cleaned up. There is a new PDF-generation Servlet (in beta) that generates PDF files from arbitrary images (try - /digitallibrary/servlet/PDFCache?fn=path/to/images&pgs=1-3&dh=1000)!
+ /digitallibrary/servlet/PDFCache?fn=path/to/images&pgs=1-3&dh=1000)! +
SVG rendering (which never worked properly) and some other old stuff has been removed. Some library dependencies have changed, check your setup when upgrading. @@ -70,15 +82,19 @@ Source code development moved to a
Mercurial repository! See the instructions to - access it.
Code of public release versions should be put also in CVS - but don't rely on it... + access it. +
+ Code of public release versions should be put also in CVS but don't rely on + it...
3.9.2009
A new File release (1.7.0) and updates to the Ant - build file.
P.S. Please note that . +
+ P.S. Please note that
a lot happens in between file releases. Check out from CVS to be up to date.
@@ -92,8 +108,7 @@
6.12.2005
- digilib - has it's own icon now! + digilib has it's own icon now!
22.11.2005
@@ -102,70 +117,63 @@

- What is - digilib + What is digilib

- Where can I get - digilib + Where can I get digilib

- digilib - source code, binaries and documentation can be found on the digilib source code, binaries and documentation can be found on the digilib project pages on BerliOS.

- - - BerliOS Logo + + + BerliOS Logo + diff -r 8abbc40d0df5 -r 9a472dab7e09 website/tips.html --- a/website/tips.html Fri Dec 09 20:33:24 2011 +0100 +++ b/website/tips.html Mon Dec 12 20:37:53 2011 +0100 @@ -12,36 +12,36 @@

- digilib - -- a versatile image viewing environment for the internet + digilib -- a versatile image viewing environment for the internet

- Info - + Info

- Project - + Project

Download

- Docs - + Docs +
+ Building +
+ Configuring +
+ ...more

- Tips - + Tips

- Source - + Source

@@ -56,7 +56,7 @@ Prescaled images
  • - Installing JAI + Installing JAI
  • @@ -134,47 +134,53 @@

    Installing JAI

    - In principle you can install the Java Advanced Imaging JAR files (and - native library files if available) in the /WEB-INF/lib/ directory of the digilib - web application. - + class="external text" rel="nofollow">Java Advanced Imaging and JAI-ImageIO + JAR files jai_core.jar, jai_codec.jar, jai_imageio.jar (and native + library files if available) in the /WEB-INF/lib/ directory of the + digilib web application.

    -

    I found that in some cases digilib stopped reading TIFF files after a - period of running. In these cases it helped to install the JAI files directly in - the local Java installation (i.e. in the Java's /jre/lib/ext/ directory on - linux).

    +

    But there are classloader issues. Newer versions of Tomcat refuse to load + the libraries and I found that in some cases digilib stopped reading TIFF files + after a period of running.

    +

    + In these cases it helped to install the JAI files in Tomcats lib/ + directory or Jettys lib/ext/ or globally in the local Java JDK + installation (i.e. in the Java's /jre/lib/ext/ directory on linux). +

    Sample setup

    -

    The current digilib setup at the MPIWG (as of November 2005):

    +

    The current digilib setup at the MPIWG (as of December 2010):

    @@ -184,7 +190,8 @@ BerliOS Logo + height="32" border="0" alt="BerliOS Logo" /> +