changeset 461:96bd3656e4a6

Servlet version 1.5.9h - experimental Flashpix support with JAIDocuImage
author robcast
date Wed, 08 Feb 2006 20:30:49 +0100
parents 530b7b58a727
children 03ff7238c9d4
files servlet/src/digilib/servlet/Texter.java
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/servlet/Texter.java	Wed Feb 08 20:30:49 2006 +0100
+++ b/servlet/src/digilib/servlet/Texter.java	Wed Feb 08 20:30:49 2006 +0100
@@ -45,7 +45,7 @@
 	private static final long serialVersionUID = -8539178734033662322L;
 
 	/** Servlet version */
-	public static String tlVersion = "0.1b1";
+	public static String tlVersion = "0.1b2";
 
 	/** DigilibConfiguration instance */
 	DigilibConfiguration dlConfig = null;
@@ -135,15 +135,15 @@
 		processRequest(request, response);
 	}
 
-protected void processRequest(HttpServletRequest request,
+	protected void processRequest(HttpServletRequest request,
 			HttpServletResponse response) throws ServletException, IOException {
-
+		
 		/*
 		 * request parameters
 		 */
 		DigilibRequest dlRequest = (DigilibRequest) request.getAttribute("digilib.servlet.request");
 		try {
-
+			
 			/*
 			 * find the file to load/send
 			 */
@@ -154,11 +154,12 @@
 				f = getTextFile(dlRequest, "");
 				if (f != null) {
 					ServletOps.sendFile(f.getFile(),	null, response);
-				} else {	
-					ServletOps.htmlMessage("No Text-File!", response);
+				} else {
+					response.sendError(HttpServletResponse.SC_NOT_FOUND, "Text-File not found!");
+					//ServletOps.htmlMessage("No Text-File!", response);
 				}
 			}
-
+			
 		} catch (FileOpException e) {
 			logger.error("ERROR: File IO Error: ", e);
 			try {
@@ -166,8 +167,8 @@
 			} catch (FileOpException ex) {
 			} // so we don't get a loop
 		}
-	}	
-
+	}
+	
 
 	/**
 	 * Looks for a file in the given subDirectory.