Mercurial > hg > digilib-old
annotate client/digitallibrary/server/dlConfig.jsp @ 400:be66c85821ff
simplyfications
author | hertzhaft |
---|---|
date | Thu, 08 Dec 2005 13:16:43 +0100 |
parents | 28f6030aa470 |
children | 6a74da78f304 |
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> | |
358
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
35 <body> |
78 | 36 |
37 <h1>Global servlet configuration</h1> | |
38 | |
39 <table> | |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
40 <% |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
41 Object[] keys = dlConfig.keySet().toArray(); |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
42 java.util.Arrays.sort(keys); |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
43 int l = keys.length; |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
44 for (int i = 0; i < l; i++) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
45 String key = (String) keys[i]; |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
46 String val = dlConfig.getAsString(key); |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
47 if (key.equals("basedir-list")) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
48 String[] bd = (String[]) dlConfig.getValue("basedir-list"); |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
49 val = ""; |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
50 if (bd != null) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
51 for (int j = 0; j < bd.length; j++) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
52 val += bd[j] + "<br> "; |
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 } |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
56 if (val.length() == 0) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
57 val = "(none)"; |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
58 } |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
59 %> |
78 | 60 <tr> |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
61 <td valign="top"><%= key %></td><td><b><%= val %></b></td> |
78 | 62 <td></td> |
63 </tr> | |
168
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 } |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
66 %> |
78 | 67 </table> |
68 | |
342 | 69 <h2>Threads</h2> |
70 | |
71 <table> | |
72 <tr> | |
73 <td>currently waiting</td><td><b><%= digilib.servlet.DigilibWorker.getNumWaiting() %></b></td> | |
74 <td></td> | |
75 </tr> | |
76 <tr> | |
77 <td>currently running</td><td><b><%= digilib.servlet.DigilibWorker.getNumRunning() %></b></td> | |
78 <td></td> | |
79 </tr> | |
80 </table> | |
81 | |
117 | 82 <h2>Directory cache</h2> |
83 | |
84 <table> | |
85 <tr> | |
154 | 86 <td>size (directories)</td><td><b><%= dirCache.size() %></b></td> |
117 | 87 <td></td> |
88 </tr> | |
89 <tr> | |
154 | 90 <td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td> |
117 | 91 <td></td> |
92 </tr> | |
93 <tr> | |
154 | 94 <td>hits</td><td><b><%= dirCache.getHits() %></b></td> |
117 | 95 <td></td> |
96 </tr> | |
97 <tr> | |
154 | 98 <td>misses</td><td><b><%= dirCache.getMisses() %></b></td> |
117 | 99 <td></td> |
100 </tr> | |
101 </table> | |
102 | |
103 <h2>JVM configuration</h2> | |
104 | |
105 <table> | |
106 <tr> | |
107 <td>java.awt.headless</td><td><b><%= System.getProperty("java.awt.headless") %></b></td> | |
108 <td></td> | |
109 </tr> | |
154 | 110 <tr> |
111 <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td> | |
112 <td></td> | |
113 </tr> | |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
114 <tr> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
115 <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
|
116 <td></td> |
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 <tr> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
119 <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
|
120 <td></td> |
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 <tr> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
123 <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
|
124 <td></td> |
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 <tr> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
127 <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
|
128 <td></td> |
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 <tr> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
131 <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
|
132 <td></td> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
133 </tr> |
117 | 134 </table> |
135 | |
358
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
136 <h2>ImageIO configuration</h2> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
137 |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
138 <p>Supported image types</p> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
139 <ul> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
140 <% |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
141 String[] formats = javax.imageio.ImageIO.getReaderFormatNames(); |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
142 for (int i = 0; i < formats.length; i++) { |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
143 %> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
144 <li><%= formats[i] %></li> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
145 <% |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
146 } |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
147 %> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
148 </ul> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
149 |
78 | 150 </body> |
151 </html> |