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