# HG changeset patch
# User robcast
# Date 1067463951 -3600
# Node ID 93dd5e1c57d3416d8fdbb8cb9e130648d9a3f19c
# Parent cf1825c48e9d261549c724f599a71efa63dedfdd
Servlet Version 1.16b2 with new DigilibParameter code.
- more generic class for request parameters
- like already done for DiglibConfig
- changes in JSPs for new request stuff
- changes in ImageSize class so size=0 is "wildcard"
- missing dw and dh parameters now treated as wildcards
- changed package name in imageinfo class
diff -r cf1825c48e9d -r 93dd5e1c57d3 client/digitallibrary/server/dlRequest.jsp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/server/dlRequest.jsp Wed Oct 29 22:45:51 2003 +0100
@@ -0,0 +1,117 @@
+<%@ page language="java" %>
+
+<%!
+// authentication stuff - robert
+// -----------------------------
+// create DocumentBean instance for all JSP requests
+digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean();
+
+// initialize DocumentBean instance in JSP init
+public void jspInit() {
+ try {
+ // set servlet init-parameter
+ docBean.setConfig(getServletConfig());
+ } catch (javax.servlet.ServletException e) {
+ System.out.println(e);
+ }
+}
+%>
+
+<%
+// get digilib config
+digilib.servlet.DigilibConfiguration dlConfig = docBean.getDlConfig();
+// parsing the query
+digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request);
+// add number of pages
+dlRequest.setValue("pt", docBean.getNumPages(dlRequest));
+// dir cache
+digilib.io.DocuDirCache dirCache = (digilib.io.DocuDirCache) dlConfig.getValue("servlet.dir.cache");
+%>
+
+
+
+
+
+ Pt | <%= dlRequest.getAsString("pt") %> |
+ total number of pages (generated by servlet) |
+
+
+ RequestPath | <%= dlRequest.getAsString("request.path") %> |
+ url of the page/document |
+
+
+ Fn | <%= dlRequest.getAsString("fn") %> | url of the page/document |
+
+
+ FilePath | <%= dlRequest.getFilePath() %> | effective path of the page/document |
+
+
+ Pn | <%= dlRequest.getAsString("pn") %> | page number |
+
+
+ Dw | <%= dlRequest.getAsString("dw") %> | width of client in pixels |
+
+
+ Dh | <%= dlRequest.getAsString("dh") %> | height of client in pixels |
+
+
+ Wx | <%= dlRequest.getAsString("wx") %> | left edge of image (float from 0 to 1) |
+
+
+ Wy | <%= dlRequest.getAsString("wy") %> | top edge in image (float from 0 to 1) |
+
+
+ Ww | <%= dlRequest.getAsString("ww") %> | width of image (float from 0 to 1) |
+
+
+ Wh | <%= dlRequest.getAsString("wh") %> | height of image (float from 0 to 1) |
+
+
+ Ws | <%= dlRequest.getAsString("ws") %> | scale factor |
+
+
+ Mo | <%= dlRequest.getAsString("mo") %> | special options like 'fit' for gifs |
+
+
+ Mk | <%= dlRequest.getAsString("mk") %> | marks |
+
+
+ BaseURL | <%= dlRequest.getAsString("base.url") %> |
+
+
+ | | base URL (from http:// to below /servlet) |
+
+
+
+