Mercurial > hg > digilib-old
changeset 168:cf1825c48e9d
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
author | robcast |
---|---|
date | Wed, 29 Oct 2003 22:45:51 +0100 |
parents | 2336ac05d57d |
children | 93dd5e1c57d3 |
files | client/digitallibrary/server/dlConfig.jsp |
diffstat | 1 files changed, 45 insertions(+), 111 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/server/dlConfig.jsp Wed Oct 29 22:45:51 2003 +0100 +++ b/client/digitallibrary/server/dlConfig.jsp Wed Oct 29 22:45:51 2003 +0100 @@ -23,7 +23,7 @@ // parsing the query digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request); // add number of pages -dlRequest.setPt(docBean.getNumPages(dlRequest)); +dlRequest.setValue("pt", docBean.getNumPages(dlRequest)); // dir cache digilib.io.DocuDirCache dirCache = (digilib.io.DocuDirCache) dlConfig.getValue("servlet.dir.cache"); %> @@ -33,122 +33,36 @@ <title>Digilib configuration page</title> </head> -<body> -<h1>Local request information</h1> - -<table> - <tr> - <td>Pt</td><td><b><%= dlRequest.getPt() %></b></td> - <td><i>total number of pages (generated by servlet)</i></td> - </tr> - <tr> - <td>RequestPath</td><td><b><%= dlRequest.getRequestPath() %></b></td> - <td><i>url of the page/document</i></td> - </tr> - <tr> - <td>Fn</td><td><b><b><%= dlRequest.getFn() %></b></td><td><i>url of the page/document</i></td> - </tr> - <tr> - <td>FilePath</td><td><b><%= dlRequest.getFilePath() %></b></td><td><i>effective path of the page/document</i></td> - </tr> - <tr> - <td>Pn</td><td><b><%= dlRequest.getPn() %></b></td><td><i>page number</i></td> - </tr> - <tr> - <td>Dw</td><td><b><%= dlRequest.getDw() %></b></td><td><i>width of client in pixels</i></td> - </tr> - <tr> - <td>Dh</td><td><b><%= dlRequest.getDh() %></b></td><td><i>height of client in pixels</i></td> - </tr> - <tr> - <td>Wx</td><td><b><%= dlRequest.getWx() %></b></td><td><i>left edge of image (float from 0 to 1)</i></td> - </tr> - <tr> - <td>Wy</td><td><b><%= dlRequest.getWy() %></b></td><td><i>top edge in image (float from 0 to 1)</i></td> - </tr> - <tr> - <td>Ww</td><td><b><%= dlRequest.getWw() %></b></td><td><i>width of image (float from 0 to 1)</i></td> - </tr> - <tr> - <td>Wh</td><td><b><%= dlRequest.getWh() %></b></td><td><i>height of image (float from 0 to 1)</i></td> - </tr> - <tr> - <td>Ws</td><td><b><%= dlRequest.getWs() %></b></td><td><i>scale factor</i></td> - </tr> - <tr> - <td>Mo</td><td><b><%= dlRequest.getMo() %></b></td><td><i>special options like 'fit' for gifs</i></td> - </tr> - <tr> - <td>Mk</td><td><b><%= dlRequest.getMk() %></b></td><td><i>marks</i></td> - </tr> - <tr> - <td>BaseURL</td><td colspan="2"><b><%= dlRequest.getBaseURL() %></b></td> - </tr> - <tr> - <td></td><td></td><td><i>base URL (from http:// to below /servlet)</i></td> - </tr> -</table> - - <h1>Global servlet configuration</h1> <table> - <tr> - <td>servlet.version</td><td><b><%= dlConfig.getAsString("servlet.version") %></b></td> - <td></td> - </tr> - <tr> - <td>servlet.config.file</td><td><b><%= dlConfig.getAsString("servlet.config.file") %></b></td> - <td></td> - </tr> +<% + Object[] keys = dlConfig.keySet().toArray(); + java.util.Arrays.sort(keys); + int l = keys.length; + for (int i = 0; i < l; i++) { + String key = (String) keys[i]; + String val = dlConfig.getAsString(key); + if (key.equals("basedir-list")) { + String[] bd = (String[]) dlConfig.getValue("basedir-list"); + val = ""; + if (bd != null) { + for (int j = 0; j < bd.length; j++) { + val += bd[j] + "<br> "; + } + } + } + if (val.length() == 0) { + val = "(none)"; + } +%> <tr> - <td align="top">basedir-list</td><td><b><% - String[] bd = (String[]) dlConfig.getValue("basedir-list"); - if (bd != null) { - for (int i = 0; i < bd.length; i++) { - %><%= bd[i] %><br><% - } - } - %></b></td> - <td></td> - </tr> - <tr> - <td>debug-level</td><td><b><%= dlConfig.getAsInt("debug-level") %></b> (<%= dlConfig.getUtil().getDebugLevel() %>)</td> - <td></td> - </tr> - <tr> - <td>docuimage-class</td><td><b><%= dlConfig.getAsString("docuimage-class") %></b><br /> - (<%= dlConfig.getValue("servlet.docuimage.class") %>)</td> + <td valign="top"><%= key %></td><td><b><%= val %></b></td> <td></td> </tr> - <tr> - <td>error-image</td><td><b><%= dlConfig.getAsString("error-image") %></b></td> - <td></td> - </tr> - <tr> - <td>denied-image</td><td><b><%= dlConfig.getAsString("denied-image") %></b></td> - <td></td> - </tr> - <tr> - <td>subsample-minimum</td><td><b><%= dlConfig.getAsFloat("subsample-minimum") %></b></td> - <td></td> - </tr> - <tr> - <td>sendfile-allowed</td><td><b><%= dlConfig.getAsBoolean("sendfile-allowed") %></b></td> - <td></td> - </tr> - <tr> - <td>use-authorization</td><td><b><%= dlConfig.getAsBoolean("use-authorization") %></b></td> - <td></td> - </tr> - <tr> - <td>auth-config</td><td><b><%= dlConfig.getAsString("auth-file") %></b></td> - <td></td> - </tr> - <tr> - <td>auth-url-path</td><td><b><%= dlConfig.getAsString("auth-url-path") %></b></td> - <td></td> - </tr> +<% + } +%> </table> <h2>Directory cache</h2> @@ -183,6 +97,26 @@ <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td> <td></td> </tr> + <tr> + <td>java.vendor</td><td><b><%= System.getProperty("java.vendor") %></b></td> + <td></td> + </tr> + <tr> + <td>os.name</td><td><b><%= System.getProperty("os.name") %></b></td> + <td></td> + </tr> + <tr> + <td>Runtime.maxMemory</td><td><b><%= Runtime.getRuntime().maxMemory() %></b></td> + <td></td> + </tr> + <tr> + <td>Runtime.totalMemory</td><td><b><%= Runtime.getRuntime().totalMemory() %></b></td> + <td></td> + </tr> + <tr> + <td>Runtime.freeMemory</td><td><b><%= Runtime.getRuntime().freeMemory() %></b></td> + <td></td> + </tr> </table> </body>