view client/digitallibrary/server/dlConfig.jsp @ 154:e4f095227510

Adapted to new DigilibConfig class.
author robcast
date Wed, 03 Sep 2003 00:58:04 +0200
parents a934824c894d
children 4879b944bb03
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.setPt(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.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>
  <tr>
    <td>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></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>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>

<table>
  <tr>
	<td>size (directories)</td><td><b><%= dirCache.size() %></b></td>
    <td></td>
  </tr>
  <tr>
	<td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td>
    <td></td>
  </tr>
  <tr>
	<td>hits</td><td><b><%= dirCache.getHits() %></b></td>
    <td></td>
  </tr>
  <tr>
	<td>misses</td><td><b><%= dirCache.getMisses() %></b></td>
    <td></td>
  </tr>
</table>

<h2>JVM configuration</h2>

<table>
  <tr>
	<td>java.awt.headless</td><td><b><%= System.getProperty("java.awt.headless") %></b></td>
    <td></td>
  </tr>
  <tr>
	<td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td>
    <td></td>
  </tr>
</table>

</body>
</html>