annotate client/digitallibrary/server/dlConfig.jsp @ 342:84bfba8a1c9e

servlet version 1.5.5b - output of the number of running and waiting threads in dlConfig.jsp
author robcast
date Thu, 18 Nov 2004 21:37:26 +0100
parents cf1825c48e9d
children 28f6030aa470
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
168
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
26 dlRequest.setValue("pt", 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 <h1>Global servlet configuration</h1>
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
37
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
38 <table>
168
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
39 <%
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
40 Object[] keys = dlConfig.keySet().toArray();
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
41 java.util.Arrays.sort(keys);
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
42 int l = keys.length;
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
43 for (int i = 0; i < l; i++) {
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
44 String key = (String) keys[i];
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
45 String val = dlConfig.getAsString(key);
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
46 if (key.equals("basedir-list")) {
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
47 String[] bd = (String[]) dlConfig.getValue("basedir-list");
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
48 val = "";
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
49 if (bd != null) {
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
50 for (int j = 0; j < bd.length; j++) {
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
51 val += bd[j] + "<br> ";
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
52 }
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
53 }
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
54 }
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
55 if (val.length() == 0) {
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
56 val = "(none)";
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
57 }
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
58 %>
78
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
59 <tr>
168
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
60 <td valign="top"><%= key %></td><td><b><%= val %></b></td>
78
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
61 <td></td>
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
62 </tr>
168
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
63 <%
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
64 }
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
65 %>
78
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
66 </table>
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
67
342
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
68 <h2>Threads</h2>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
69
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
70 <table>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
71 <tr>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
72 <td>currently waiting</td><td><b><%= digilib.servlet.DigilibWorker.getNumWaiting() %></b></td>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
73 <td></td>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
74 </tr>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
75 <tr>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
76 <td>currently running</td><td><b><%= digilib.servlet.DigilibWorker.getNumRunning() %></b></td>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
77 <td></td>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
78 </tr>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
79 </table>
84bfba8a1c9e servlet version 1.5.5b
robcast
parents: 168
diff changeset
80
117
a934824c894d config with cache info
robcast
parents: 78
diff changeset
81 <h2>Directory cache</h2>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
82
a934824c894d config with cache info
robcast
parents: 78
diff changeset
83 <table>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
84 <tr>
154
e4f095227510 Adapted to new DigilibConfig class.
robcast
parents: 117
diff changeset
85 <td>size (directories)</td><td><b><%= dirCache.size() %></b></td>
117
a934824c894d config with cache info
robcast
parents: 78
diff changeset
86 <td></td>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
87 </tr>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
88 <tr>
154
e4f095227510 Adapted to new DigilibConfig class.
robcast
parents: 117
diff changeset
89 <td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td>
117
a934824c894d config with cache info
robcast
parents: 78
diff changeset
90 <td></td>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
91 </tr>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
92 <tr>
154
e4f095227510 Adapted to new DigilibConfig class.
robcast
parents: 117
diff changeset
93 <td>hits</td><td><b><%= dirCache.getHits() %></b></td>
117
a934824c894d config with cache info
robcast
parents: 78
diff changeset
94 <td></td>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
95 </tr>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
96 <tr>
154
e4f095227510 Adapted to new DigilibConfig class.
robcast
parents: 117
diff changeset
97 <td>misses</td><td><b><%= dirCache.getMisses() %></b></td>
117
a934824c894d config with cache info
robcast
parents: 78
diff changeset
98 <td></td>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
99 </tr>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
100 </table>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
101
a934824c894d config with cache info
robcast
parents: 78
diff changeset
102 <h2>JVM configuration</h2>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
103
a934824c894d config with cache info
robcast
parents: 78
diff changeset
104 <table>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
105 <tr>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
106 <td>java.awt.headless</td><td><b><%= System.getProperty("java.awt.headless") %></b></td>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
107 <td></td>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
108 </tr>
154
e4f095227510 Adapted to new DigilibConfig class.
robcast
parents: 117
diff changeset
109 <tr>
e4f095227510 Adapted to new DigilibConfig class.
robcast
parents: 117
diff changeset
110 <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td>
e4f095227510 Adapted to new DigilibConfig class.
robcast
parents: 117
diff changeset
111 <td></td>
e4f095227510 Adapted to new DigilibConfig class.
robcast
parents: 117
diff changeset
112 </tr>
168
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
113 <tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
114 <td>java.vendor</td><td><b><%= System.getProperty("java.vendor") %></b></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
115 <td></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
116 </tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
117 <tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
118 <td>os.name</td><td><b><%= System.getProperty("os.name") %></b></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
119 <td></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
120 </tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
121 <tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
122 <td>Runtime.maxMemory</td><td><b><%= Runtime.getRuntime().maxMemory() %></b></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
123 <td></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
124 </tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
125 <tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
126 <td>Runtime.totalMemory</td><td><b><%= Runtime.getRuntime().totalMemory() %></b></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
127 <td></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
128 </tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
129 <tr>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
130 <td>Runtime.freeMemory</td><td><b><%= Runtime.getRuntime().freeMemory() %></b></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
131 <td></td>
cf1825c48e9d Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 157
diff changeset
132 </tr>
117
a934824c894d config with cache info
robcast
parents: 78
diff changeset
133 </table>
a934824c894d config with cache info
robcast
parents: 78
diff changeset
134
78
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
135 </body>
e0dcac9c66fa New servlet version 1.5b.
robcast
parents:
diff changeset
136 </html>