Mercurial > hg > digilib-old
annotate client/digitallibrary/server/dlConfig.jsp @ 636:7049579a0097 jquery
last and next page works now
implemented redisplay function (only tested with fullscreen)
parameters that are changed need to be in data.queryParams to get in the url on redisplay
author | robcast |
---|---|
date | Tue, 18 Jan 2011 21:30:03 +0100 |
parents | 0885f5ca5b24 |
children |
rev | line source |
---|---|
557 | 1 <%@page import="digilib.util.DigilibJobCenter"%> |
78 | 2 <%@ page language="java" %> |
3 | |
4 <%! | |
5 // authentication stuff - robert | |
6 // ----------------------------- | |
7 // create DocumentBean instance for all JSP requests | |
8 digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); | |
9 | |
10 // initialize DocumentBean instance in JSP init | |
11 public void jspInit() { | |
12 try { | |
13 // set servlet init-parameter | |
14 docBean.setConfig(getServletConfig()); | |
15 } catch (javax.servlet.ServletException e) { | |
16 System.out.println(e); | |
17 } | |
18 } | |
19 %> | |
20 | |
21 <% | |
22 // get digilib config | |
23 digilib.servlet.DigilibConfiguration dlConfig = docBean.getDlConfig(); | |
24 // parsing the query | |
25 digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request); | |
26 // add number of pages | |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
27 dlRequest.setValue("pt", docBean.getNumPages(dlRequest)); |
154 | 28 // dir cache |
29 digilib.io.DocuDirCache dirCache = (digilib.io.DocuDirCache) dlConfig.getValue("servlet.dir.cache"); | |
544
5ff500d6812a
more steps towards more standard java.util.concurrent design
robcast
parents:
467
diff
changeset
|
30 // image JobCenter |
5ff500d6812a
more steps towards more standard java.util.concurrent design
robcast
parents:
467
diff
changeset
|
31 DigilibJobCenter imageProcessor = (DigilibJobCenter)dlConfig.getValue("servlet.worker.imageexecutor"); |
5ff500d6812a
more steps towards more standard java.util.concurrent design
robcast
parents:
467
diff
changeset
|
32 |
78 | 33 %> |
34 | |
35 <html> | |
36 <head> | |
37 <title>Digilib configuration page</title> | |
38 </head> | |
358
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
39 <body> |
78 | 40 |
41 <h1>Global servlet configuration</h1> | |
42 | |
43 <table> | |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
44 <% |
548 | 45 Object[] keys = dlConfig.getParams().keySet().toArray(); |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
46 java.util.Arrays.sort(keys); |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
47 int l = keys.length; |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
48 for (int i = 0; i < l; i++) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
49 String key = (String) keys[i]; |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
50 String val = dlConfig.getAsString(key); |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
51 if (key.equals("basedir-list")) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
52 String[] bd = (String[]) dlConfig.getValue("basedir-list"); |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
53 val = ""; |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
54 if (bd != null) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
55 for (int j = 0; j < bd.length; j++) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
56 val += bd[j] + "<br> "; |
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 } |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
59 } |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
60 if (val.length() == 0) { |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
61 val = "(none)"; |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
62 } |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
63 %> |
78 | 64 <tr> |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
65 <td valign="top"><%= key %></td><td><b><%= val %></b></td> |
78 | 66 <td></td> |
67 </tr> | |
168
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
68 <% |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
69 } |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
70 %> |
78 | 71 </table> |
72 | |
342 | 73 <h2>Threads</h2> |
74 | |
75 <table> | |
76 <tr> | |
544
5ff500d6812a
more steps towards more standard java.util.concurrent design
robcast
parents:
467
diff
changeset
|
77 <td>currently waiting</td><td><b><%= imageProcessor.getWaitingJobs() %></b></td> |
342 | 78 <td></td> |
79 </tr> | |
80 <tr> | |
544
5ff500d6812a
more steps towards more standard java.util.concurrent design
robcast
parents:
467
diff
changeset
|
81 <td>currently running</td><td><b><%= imageProcessor.getRunningJobs() %></b></td> |
342 | 82 <td></td> |
83 </tr> | |
84 </table> | |
85 | |
117 | 86 <h2>Directory cache</h2> |
87 | |
88 <table> | |
89 <tr> | |
154 | 90 <td>size (directories)</td><td><b><%= dirCache.size() %></b></td> |
117 | 91 <td></td> |
92 </tr> | |
93 <tr> | |
154 | 94 <td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td> |
117 | 95 <td></td> |
96 </tr> | |
97 <tr> | |
154 | 98 <td>hits</td><td><b><%= dirCache.getHits() %></b></td> |
117 | 99 <td></td> |
100 </tr> | |
101 <tr> | |
154 | 102 <td>misses</td><td><b><%= dirCache.getMisses() %></b></td> |
117 | 103 <td></td> |
104 </tr> | |
105 </table> | |
106 | |
107 <h2>JVM configuration</h2> | |
108 | |
109 <table> | |
110 <tr> | |
111 <td>java.awt.headless</td><td><b><%= System.getProperty("java.awt.headless") %></b></td> | |
112 <td></td> | |
113 </tr> | |
154 | 114 <tr> |
115 <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td> | |
116 <td></td> | |
117 </tr> | |
168
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>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
|
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>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
|
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.maxMemory</td><td><b><%= Runtime.getRuntime().maxMemory() %></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.totalMemory</td><td><b><%= Runtime.getRuntime().totalMemory() %></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> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
134 <tr> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
135 <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
|
136 <td></td> |
cf1825c48e9d
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
157
diff
changeset
|
137 </tr> |
117 | 138 </table> |
139 | |
467 | 140 <h2>DocuImage configuration</h2> |
358
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
141 |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
142 <p>Supported image types</p> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
143 <ul> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
144 <% |
467 | 145 java.util.Iterator dlfs = dlConfig.getDocuImageInstance().getSupportedFormats(); |
146 for (Object f = dlfs.next(); dlfs.hasNext(); f = dlfs.next()) { | |
358
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
147 %> |
467 | 148 <li><%= (String)f %></li> |
358
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
149 <% |
467 | 150 } |
358
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
151 %> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
152 </ul> |
28f6030aa470
digilib status shows ImageIO's types of supported images
robcast
parents:
342
diff
changeset
|
153 |
467 | 154 |
78 | 155 </body> |
156 </html> |