view client/digitallibrary/server/dlRequest.jsp @ 636:7049579a0097 jquery

last and next page works now implemented redisplay function (only tested with fullscreen) parameters that are changed need to be in data.queryParams to get in the url on redisplay
author robcast
date Tue, 18 Jan 2011 21:30:03 +0100
parents bc9196347188
children
line wrap: on
line source

<%@ 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");
%>

<html>
<head>
<title>Digilib configuration page</title>
</head>

<body>
<h1>Local request information</h1>

<table>
  <tr>
    <td>Pt</td><td><b><%= dlRequest.getAsString("pt") %></b></td>
    <td><i>total number of pages (generated by servlet)</i></td>
  </tr>
  <tr>
    <td>RequestPath</td><td><b><%= dlRequest.getAsString("request.path") %></b></td>
    <td><i>url of the page/document</i></td>
  </tr>
  <tr>
    <td>Fn</td><td><b><b><%= dlRequest.getAsString("fn") %></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.getAsString("pn") %></b></td><td><i>page number</i></td>
  </tr>
  <tr>
    <td>Dw</td><td><b><%= dlRequest.getAsString("dw") %></b></td><td><i>width of client in pixels</i></td>
  </tr>
  <tr>
    <td>Dh</td><td><b><%= dlRequest.getAsString("dh") %></b></td><td><i>height of client in pixels</i></td>
  </tr>
  <tr>
    <td>Wx</td><td><b><%= dlRequest.getAsString("wx") %></b></td><td><i>left edge of image (float from 0 to 1)</i></td>
  </tr>
  <tr>
    <td>Wy</td><td><b><%= dlRequest.getAsString("wy") %></b></td><td><i>top edge in image (float from 0 to 1)</i></td>
  </tr>
  <tr>
    <td>Ww</td><td><b><%= dlRequest.getAsString("ww") %></b></td><td><i>width of image (float from 0 to 1)</i></td>
  </tr>
  <tr>
    <td>Wh</td><td><b><%= dlRequest.getAsString("wh") %></b></td><td><i>height of image (float from 0 to 1)</i></td>
  </tr>
  <tr>
    <td>Ws</td><td><b><%= dlRequest.getAsString("ws") %></b></td><td><i>scale factor</i></td>
  </tr>
  <tr>
    <td>Mo</td><td><b><%= dlRequest.getAsString("mo") %></b></td><td><i>special options like 'fit' for gifs</i></td>
  </tr>
  <tr>
    <td>Mk</td><td><b><%= dlRequest.getAsString("mk") %></b></td><td><i>marks</i></td>
  </tr>
  <tr>
    <td>BaseURL</td><td colspan="2"><b><%= dlRequest.getAsString("base.url") %></b></td>
  </tr>
  <tr>
    <td></td><td></td><td><i>base URL (from http:// to below /servlet)</i></td>
  </tr>
</table>

<h2>All parameters<h2>

<table>
<%
    Object[] keys = dlRequest.getParams().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 = dlRequest.getAsString(key);
	if (val.length() == 0) {
	    val = "</b>(none)<b>";
	}
%>
  <tr>
    <td valign="top"><%= key %></td><td><b><%= val %></b></td>
    <td><% if (! dlRequest.hasValue(key)) { %> (default) <% } %></td>
  </tr>
<%
       }
%>
</table>


</body>
</html>