# 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 @@ + + +
+ ++ |
+ ![]()
+
+ |
+
+ + Info + ++ Project + ++ Download + +
+ Docs
+ + 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+
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
+ If you want to use the new-and-better Asynchronous Servlet API add Deploying the web application by hand+ +
+ To deploy digilib just copy the web application directory into the
+ 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 + 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 + 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 mvn scm:checkout -N -DcheckoutDirectory=digilib+ in the same directory as the pom.xml file you downloaded.
+
+
+ The digilib configuration files are now in
+ To build the resulting source code, change into the 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 |
+
+ |
+ + |
+ |
+ ![]() + digilib -- a versatile image viewing environment for the internet ++ |
+
+ + Info + ++ Project + ++ Download + + +
+ Docs
+ + Tips + ++ Source + + |
+
+
+ Configuring digilib+ +digilib-config.xml+ +
+ The main configuration for digilib is 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 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 digilib-auth.xml+ +
+ The digilib access authorization is defined in the file defined by the
+ The file has two parts +<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> ++ +
+
+ |
+
+ |
+ + |
+ |
+ ![]()
+
+ |
+
+ + Info + ++ Project + ++ Download + +
+ Docs
+ + Tips + ++ Source + + |
+
+
+ digilib documentation+ ++ Building digilib with Maven + + ++ ...more + documentation (installing ready-built digilib, digilib web API, etc.) + ++ Tips for running digilib (Java memory settings, using + prescaled images, etc.) + + |
+
+ |
+ + |
- Docs
+ Docs
+
+ Building
+
+ Configuring
+
+ ...more
Tips @@ -45,6 +50,12 @@
- 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.
-
- Docs
-
+ Docs
+
+ Building
+
+ Configuring
+
+ ...more
- 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).
+
The current digilib setup at the MPIWG (as of November 2005):
+The current digilib setup at the MPIWG (as of December 2010):