Mercurial > hg > digilib-old
annotate client/digitallibrary/server/dlConfig.jsp @ 353:25095f85ba7c
Servlet version 1.5.9c
- (hopefully) fixed problem with digilib 1.5.9b stopping after a day...
author | robcast |
---|---|
date | Tue, 27 Sep 2005 19:37:28 +0200 |
parents | 84bfba8a1c9e |
children | 28f6030aa470 |
rev | line source |
---|---|
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 | |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
26 dlRequest.setValue("pt", 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 <h1>Global servlet configuration</h1> | |
37 | |
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 | 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 | 61 <td></td> |
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 | 66 </table> |
67 | |
342 | 68 <h2>Threads</h2> |
69 | |
70 <table> | |
71 <tr> | |
72 <td>currently waiting</td><td><b><%= digilib.servlet.DigilibWorker.getNumWaiting() %></b></td> | |
73 <td></td> | |
74 </tr> | |
75 <tr> | |
76 <td>currently running</td><td><b><%= digilib.servlet.DigilibWorker.getNumRunning() %></b></td> | |
77 <td></td> | |
78 </tr> | |
79 </table> | |
80 | |
117 | 81 <h2>Directory cache</h2> |
82 | |
83 <table> | |
84 <tr> | |
154 | 85 <td>size (directories)</td><td><b><%= dirCache.size() %></b></td> |
117 | 86 <td></td> |
87 </tr> | |
88 <tr> | |
154 | 89 <td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td> |
117 | 90 <td></td> |
91 </tr> | |
92 <tr> | |
154 | 93 <td>hits</td><td><b><%= dirCache.getHits() %></b></td> |
117 | 94 <td></td> |
95 </tr> | |
96 <tr> | |
154 | 97 <td>misses</td><td><b><%= dirCache.getMisses() %></b></td> |
117 | 98 <td></td> |
99 </tr> | |
100 </table> | |
101 | |
102 <h2>JVM configuration</h2> | |
103 | |
104 <table> | |
105 <tr> | |
106 <td>java.awt.headless</td><td><b><%= System.getProperty("java.awt.headless") %></b></td> | |
107 <td></td> | |
108 </tr> | |
154 | 109 <tr> |
110 <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td> | |
111 <td></td> | |
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 | 133 </table> |
134 | |
78 | 135 </body> |
136 </html> |