changeset 67:4ef2a86fc1bc

Use standard JAI again. ImageLoader plugin doesn't work.
author robcast
date Wed, 08 Jan 2003 16:01:27 +0100
parents 7395e65da80c
children 35d32982106c
files servlet/src/digilib/servlet/Scaler.java
diffstat 1 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/servlet/Scaler.java	Tue Jan 07 19:07:59 2003 +0100
+++ b/servlet/src/digilib/servlet/Scaler.java	Wed Jan 08 16:01:27 2003 +0100
@@ -103,10 +103,10 @@
     // FileOps instance
     fileOp = new FileOps(util);
     // global DocuImage instance (don't reuse inside a request!)
-    //globalImage = new JAIDocuImage(util);
+    globalImage = new JAIDocuImage(util);
     // globalImage = new JIMIDocuImage(util);
     //globalImage = new ImageLoaderDocuImage(util);
-    globalImage = new JAIImageLoaderDocuImage(util);
+    //globalImage = new JAIImageLoaderDocuImage(util);
   }
 
   /**Process the HTTP Get request*/
@@ -211,10 +211,10 @@
     try {
 
     // DocuImage instance
-    //DocuImage docuImage = new JAIDocuImage(util);
+    DocuImage docuImage = new JAIDocuImage(util);
     //DocuImage docuImage = new JIMIDocuImage(util);
     //DocuImage docuImage = new ImageLoaderDocuImage(util);
-    DocuImage docuImage = new JAIImageLoaderDocuImage(util);
+    //DocuImage docuImage = new JAIImageLoaderDocuImage(util);
 
     /**
      *  find the file to load/send
@@ -367,6 +367,17 @@
       } catch (FileOpException ex) {} // so we don't get a loop
       return;
     }
+    catch (RuntimeException e) {
+      Utils.dprintln(1, "ERROR: Any other Error: "+e);
+      try {
+        if (errorMsgHtml) {
+          servletOp.htmlMessage("ERROR: Other Error: "+e, response);
+        } else {
+          globalImage.sendFile(errorImgFile, response);
+        }
+      } catch (FileOpException ex) {} // so we don't get a loop
+      return;
+    }
 
   }