annotate client/digitallibrary/server/dlConfig.jsp @ 338:b9ba23e28aa1

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 f743c238d2e5
children 5d4d9528a07f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
1 <%@ page language="java" %>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
2
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
3 <%!
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
4 // authentication stuff - robert
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
5 // -----------------------------
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
6 // create DocumentBean instance for all JSP requests
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
7 digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean();
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
8
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
9 // initialize DocumentBean instance in JSP init
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
10 public void jspInit() {
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
11 try {
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
12 // set servlet init-parameter
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
13 docBean.setConfig(getServletConfig());
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
14 } catch (javax.servlet.ServletException e) {
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
15 System.out.println(e);
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
16 }
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
17 }
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
18 %>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
19
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
20 <%
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
21 // get digilib config
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
22 digilib.servlet.DigilibConfiguration dlConfig = docBean.getDlConfig();
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
23 // parsing the query
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
24 digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request);
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
25 // add number of pages
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
26 dlRequest.setValue("pt", docBean.getNumPages(dlRequest));
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
27 // dir cache
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
28 digilib.io.DocuDirCache dirCache = (digilib.io.DocuDirCache) dlConfig.getValue("servlet.dir.cache");
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
29 %>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
30
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
31 <html>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
32 <head>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
33 <title>Digilib configuration page</title>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
34 </head>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
35
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
36 <h1>Global servlet configuration</h1>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
37
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
38 <table>
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
39 <%
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
40 Object[] keys = dlConfig.keySet().toArray();
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
41 java.util.Arrays.sort(keys);
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
42 int l = keys.length;
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
43 for (int i = 0; i < l; i++) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
44 String key = (String) keys[i];
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
45 String val = dlConfig.getAsString(key);
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
46 if (key.equals("basedir-list")) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
47 String[] bd = (String[]) dlConfig.getValue("basedir-list");
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
48 val = "";
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
49 if (bd != null) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
50 for (int j = 0; j < bd.length; j++) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
51 val += bd[j] + "<br> ";
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
52 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
53 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
54 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
55 if (val.length() == 0) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
56 val = "(none)";
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
57 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
58 %>
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
59 <tr>
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
60 <td valign="top"><%= key %></td><td><b><%= val %></b></td>
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
61 <td></td>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
62 </tr>
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
63 <%
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
64 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
65 %>
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
66 </table>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
67
338
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
68 <h2>Threads</h2>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
69
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
70 <table>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
71 <tr>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
72 <td>currently waiting</td><td><b><%= digilib.servlet.DigilibWorker.getNumWaiting() %></b></td>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
73 <td></td>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
74 </tr>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
75 <tr>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
76 <td>currently running</td><td><b><%= digilib.servlet.DigilibWorker.getNumRunning() %></b></td>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
77 <td></td>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
78 </tr>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
79 </table>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
80
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
81 <h2>Directory cache</h2>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
82
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
83 <table>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
84 <tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
85 <td>size (directories)</td><td><b><%= dirCache.size() %></b></td>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
86 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
87 </tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
88 <tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
89 <td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
90 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
91 </tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
92 <tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
93 <td>hits</td><td><b><%= dirCache.getHits() %></b></td>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
94 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
95 </tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
96 <tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
97 <td>misses</td><td><b><%= dirCache.getMisses() %></b></td>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
98 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
99 </tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
100 </table>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
101
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
102 <h2>JVM configuration</h2>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
103
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
104 <table>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
105 <tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
106 <td>java.awt.headless</td><td><b><%= System.getProperty("java.awt.headless") %></b></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
107 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
108 </tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
109 <tr>
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
110 <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td>
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
111 <td></td>
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
112 </tr>
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
113 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
114 <td>java.vendor</td><td><b><%= System.getProperty("java.vendor") %></b></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
115 <td></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
116 </tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
117 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
118 <td>os.name</td><td><b><%= System.getProperty("os.name") %></b></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
119 <td></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
120 </tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
121 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
122 <td>Runtime.maxMemory</td><td><b><%= Runtime.getRuntime().maxMemory() %></b></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
123 <td></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
124 </tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
125 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
126 <td>Runtime.totalMemory</td><td><b><%= Runtime.getRuntime().totalMemory() %></b></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
127 <td></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
128 </tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
129 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
130 <td>Runtime.freeMemory</td><td><b><%= Runtime.getRuntime().freeMemory() %></b></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
131 <td></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
132 </tr>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
133 </table>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
134
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
135 </body>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
136 </html>