78
|
1 <%@ page language="java" %>
|
|
2
|
|
3 <%!
|
|
4 // authentication stuff - robert
|
|
5 // -----------------------------
|
|
6 // create DocumentBean instance for all JSP requests
|
|
7 digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean();
|
|
8
|
|
9 // initialize DocumentBean instance in JSP init
|
|
10 public void jspInit() {
|
|
11 try {
|
|
12 // set servlet init-parameter
|
|
13 docBean.setConfig(getServletConfig());
|
|
14 } catch (javax.servlet.ServletException e) {
|
|
15 System.out.println(e);
|
|
16 }
|
|
17 }
|
|
18 %>
|
|
19
|
|
20 <%
|
|
21 // get digilib config
|
|
22 digilib.servlet.DigilibConfiguration dlConfig = docBean.getDlConfig();
|
|
23 // parsing the query
|
|
24 digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request);
|
|
25 // add number of pages
|
|
26 dlRequest.setPt(docBean.getNumPages(dlRequest));
|
154
|
27 // dir cache
|
|
28 digilib.io.DocuDirCache dirCache = (digilib.io.DocuDirCache) dlConfig.getValue("servlet.dir.cache");
|
78
|
29 %>
|
|
30
|
|
31 <html>
|
|
32 <head>
|
|
33 <title>Digilib configuration page</title>
|
|
34 </head>
|
|
35
|
|
36 <body>
|
|
37 <h1>Local request information</h1>
|
|
38
|
|
39 <table>
|
|
40 <tr>
|
|
41 <td>Pt</td><td><b><%= dlRequest.getPt() %></b></td>
|
|
42 <td><i>total number of pages (generated by servlet)</i></td>
|
|
43 </tr>
|
|
44 <tr>
|
|
45 <td>RequestPath</td><td><b><%= dlRequest.getRequestPath() %></b></td>
|
|
46 <td><i>url of the page/document</i></td>
|
|
47 </tr>
|
|
48 <tr>
|
|
49 <td>Fn</td><td><b><b><%= dlRequest.getFn() %></b></td><td><i>url of the page/document</i></td>
|
|
50 </tr>
|
|
51 <tr>
|
|
52 <td>FilePath</td><td><b><%= dlRequest.getFilePath() %></b></td><td><i>effective path of the page/document</i></td>
|
|
53 </tr>
|
|
54 <tr>
|
|
55 <td>Pn</td><td><b><%= dlRequest.getPn() %></b></td><td><i>page number</i></td>
|
|
56 </tr>
|
|
57 <tr>
|
|
58 <td>Dw</td><td><b><%= dlRequest.getDw() %></b></td><td><i>width of client in pixels</i></td>
|
|
59 </tr>
|
|
60 <tr>
|
|
61 <td>Dh</td><td><b><%= dlRequest.getDh() %></b></td><td><i>height of client in pixels</i></td>
|
|
62 </tr>
|
|
63 <tr>
|
|
64 <td>Wx</td><td><b><%= dlRequest.getWx() %></b></td><td><i>left edge of image (float from 0 to 1)</i></td>
|
|
65 </tr>
|
|
66 <tr>
|
|
67 <td>Wy</td><td><b><%= dlRequest.getWy() %></b></td><td><i>top edge in image (float from 0 to 1)</i></td>
|
|
68 </tr>
|
|
69 <tr>
|
|
70 <td>Ww</td><td><b><%= dlRequest.getWw() %></b></td><td><i>width of image (float from 0 to 1)</i></td>
|
|
71 </tr>
|
|
72 <tr>
|
|
73 <td>Wh</td><td><b><%= dlRequest.getWh() %></b></td><td><i>height of image (float from 0 to 1)</i></td>
|
|
74 </tr>
|
|
75 <tr>
|
|
76 <td>Ws</td><td><b><%= dlRequest.getWs() %></b></td><td><i>scale factor</i></td>
|
|
77 </tr>
|
|
78 <tr>
|
|
79 <td>Mo</td><td><b><%= dlRequest.getMo() %></b></td><td><i>special options like 'fit' for gifs</i></td>
|
|
80 </tr>
|
|
81 <tr>
|
|
82 <td>Mk</td><td><b><%= dlRequest.getMk() %></b></td><td><i>marks</i></td>
|
|
83 </tr>
|
|
84 <tr>
|
|
85 <td>BaseURL</td><td colspan="2"><b><%= dlRequest.getBaseURL() %></b></td>
|
|
86 </tr>
|
|
87 <tr>
|
|
88 <td></td><td></td><td><i>base URL (from http:// to below /servlet)</i></td>
|
|
89 </tr>
|
|
90 </table>
|
|
91
|
|
92
|
|
93 <h1>Global servlet configuration</h1>
|
|
94
|
|
95 <table>
|
|
96 <tr>
|
154
|
97 <td>servlet.version</td><td><b><%= dlConfig.getAsString("servlet.version") %></b></td>
|
78
|
98 <td></td>
|
|
99 </tr>
|
|
100 <tr>
|
154
|
101 <td>servlet.config.file</td><td><b><%= dlConfig.getAsString("servlet.config.file") %></b></td>
|
78
|
102 <td></td>
|
|
103 </tr>
|
|
104 <tr>
|
154
|
105 <td>basedir-list</td><td><b><%
|
|
106 String[] bd = (String[]) dlConfig.getValue("basedir-list");
|
|
107 if (bd != null) {
|
|
108 for (int i = 0; i < bd.length; i++) {
|
|
109 %><%= bd[i] %><br><%
|
|
110 }
|
|
111 }
|
|
112 %></b></td>
|
78
|
113 <td></td>
|
|
114 </tr>
|
|
115 <tr>
|
154
|
116 <td>debug-level</td><td><b><%= dlConfig.getAsInt("debug-level") %></b> (<%= dlConfig.getUtil().getDebugLevel() %>)</td>
|
78
|
117 <td></td>
|
|
118 </tr>
|
|
119 <tr>
|
154
|
120 <td>docuimage-class</td><td><b><%= dlConfig.getAsString("docuimage-class") %></b></td>
|
78
|
121 <td></td>
|
|
122 </tr>
|
|
123 <tr>
|
154
|
124 <td>error-image</td><td><b><%= dlConfig.getAsString("error-image") %></b></td>
|
|
125 <td></td>
|
|
126 </tr>
|
|
127 <tr>
|
|
128 <td>denied-image</td><td><b><%= dlConfig.getAsString("denied-image") %></b></td>
|
78
|
129 <td></td>
|
|
130 </tr>
|
|
131 <tr>
|
154
|
132 <td>sendfile-allowed</td><td><b><%= dlConfig.getAsBoolean("sendfile-allowed") %></b></td>
|
78
|
133 <td></td>
|
|
134 </tr>
|
|
135 <tr>
|
154
|
136 <td>use-authorization</td><td><b><%= dlConfig.getAsBoolean("use-authorization") %></b></td>
|
78
|
137 <td></td>
|
|
138 </tr>
|
|
139 <tr>
|
154
|
140 <td>auth-config</td><td><b><%= dlConfig.getAsString("auth-file") %></b></td>
|
78
|
141 <td></td>
|
|
142 </tr>
|
|
143 <tr>
|
154
|
144 <td>auth-url-path</td><td><b><%= dlConfig.getAsString("auth-url-path") %></b></td>
|
78
|
145 <td></td>
|
|
146 </tr>
|
|
147 </table>
|
|
148
|
117
|
149 <h2>Directory cache</h2>
|
|
150
|
|
151 <table>
|
|
152 <tr>
|
154
|
153 <td>size (directories)</td><td><b><%= dirCache.size() %></b></td>
|
117
|
154 <td></td>
|
|
155 </tr>
|
|
156 <tr>
|
154
|
157 <td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td>
|
117
|
158 <td></td>
|
|
159 </tr>
|
|
160 <tr>
|
154
|
161 <td>hits</td><td><b><%= dirCache.getHits() %></b></td>
|
117
|
162 <td></td>
|
|
163 </tr>
|
|
164 <tr>
|
154
|
165 <td>misses</td><td><b><%= dirCache.getMisses() %></b></td>
|
117
|
166 <td></td>
|
|
167 </tr>
|
|
168 </table>
|
|
169
|
|
170 <h2>JVM configuration</h2>
|
|
171
|
|
172 <table>
|
|
173 <tr>
|
|
174 <td>java.awt.headless</td><td><b><%= System.getProperty("java.awt.headless") %></b></td>
|
|
175 <td></td>
|
|
176 </tr>
|
154
|
177 <tr>
|
|
178 <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td>
|
|
179 <td></td>
|
|
180 </tr>
|
117
|
181 </table>
|
|
182
|
78
|
183 </body>
|
|
184 </html>
|