annotate client/digitallibrary/server/dlConfig.jsp @ 629:6b24ad042d7b 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 480c3553c8d2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
553
480c3553c8d2 more refactoring and rearranging
robcast
parents: 544
diff changeset
1 <%@page import="digilib.util.DigilibJobCenter"%>
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
2 <%@ page language="java" %>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
3
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
4 <%!
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
5 // authentication stuff - robert
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
6 // -----------------------------
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
7 // create DocumentBean instance for all JSP requests
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
8 digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean();
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
9
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
10 // initialize DocumentBean instance in JSP init
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
11 public void jspInit() {
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
12 try {
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
13 // set servlet init-parameter
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
14 docBean.setConfig(getServletConfig());
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
15 } catch (javax.servlet.ServletException e) {
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
16 System.out.println(e);
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 <%
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
22 // get digilib config
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
23 digilib.servlet.DigilibConfiguration dlConfig = docBean.getDlConfig();
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
24 // parsing the query
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
25 digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request);
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
26 // add number of pages
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
27 dlRequest.setValue("pt", docBean.getNumPages(dlRequest));
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
28 // dir cache
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
29 digilib.io.DocuDirCache dirCache = (digilib.io.DocuDirCache) dlConfig.getValue("servlet.dir.cache");
540
a985d69beb41 more steps towards more standard java.util.concurrent design
robcast
parents: 463
diff changeset
30 // image JobCenter
a985d69beb41 more steps towards more standard java.util.concurrent design
robcast
parents: 463
diff changeset
31 DigilibJobCenter imageProcessor = (DigilibJobCenter)dlConfig.getValue("servlet.worker.imageexecutor");
a985d69beb41 more steps towards more standard java.util.concurrent design
robcast
parents: 463
diff changeset
32
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
33 %>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
34
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
35 <html>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
36 <head>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
37 <title>Digilib configuration page</title>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
38 </head>
354
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
39 <body>
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
40
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
41 <h1>Global servlet configuration</h1>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
42
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
43 <table>
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
44 <%
544
a7caedbfdb8d more refactoring and cleanup
robcast
parents: 540
diff changeset
45 Object[] keys = dlConfig.getParams().keySet().toArray();
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
46 java.util.Arrays.sort(keys);
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
47 int l = keys.length;
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
48 for (int i = 0; i < l; i++) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
49 String key = (String) keys[i];
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
50 String val = dlConfig.getAsString(key);
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
51 if (key.equals("basedir-list")) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
52 String[] bd = (String[]) dlConfig.getValue("basedir-list");
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
53 val = "";
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
54 if (bd != null) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
55 for (int j = 0; j < bd.length; j++) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
56 val += bd[j] + "<br> ";
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 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
59 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
60 if (val.length() == 0) {
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
61 val = "(none)";
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
62 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
63 %>
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
64 <tr>
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
65 <td valign="top"><%= key %></td><td><b><%= val %></b></td>
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
66 <td></td>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
67 </tr>
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
68 <%
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
69 }
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
70 %>
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
71 </table>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
72
338
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
73 <h2>Threads</h2>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
74
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
75 <table>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
76 <tr>
540
a985d69beb41 more steps towards more standard java.util.concurrent design
robcast
parents: 463
diff changeset
77 <td>currently waiting</td><td><b><%= imageProcessor.getWaitingJobs() %></b></td>
338
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
78 <td></td>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
79 </tr>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
80 <tr>
540
a985d69beb41 more steps towards more standard java.util.concurrent design
robcast
parents: 463
diff changeset
81 <td>currently running</td><td><b><%= imageProcessor.getRunningJobs() %></b></td>
338
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
82 <td></td>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
83 </tr>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
84 </table>
b9ba23e28aa1 servlet version 1.5.5b
robcast
parents: 164
diff changeset
85
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
86 <h2>Directory cache</h2>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
87
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
88 <table>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
89 <tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
90 <td>size (directories)</td><td><b><%= dirCache.size() %></b></td>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
91 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
92 </tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
93 <tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
94 <td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
95 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
96 </tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
97 <tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
98 <td>hits</td><td><b><%= dirCache.getHits() %></b></td>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
99 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
100 </tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
101 <tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
102 <td>misses</td><td><b><%= dirCache.getMisses() %></b></td>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
103 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
104 </tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
105 </table>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
106
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
107 <h2>JVM configuration</h2>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
108
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
109 <table>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
110 <tr>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
111 <td>java.awt.headless</td><td><b><%= System.getProperty("java.awt.headless") %></b></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
112 <td></td>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
113 </tr>
150
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
114 <tr>
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
115 <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td>
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
116 <td></td>
c0a88caa51d7 Adapted to new DigilibConfig class.
robcast
parents: 113
diff changeset
117 </tr>
164
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
118 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
119 <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
120 <td></td>
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 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
123 <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
124 <td></td>
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 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
127 <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
128 <td></td>
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 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
131 <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
132 <td></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
133 </tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
134 <tr>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
135 <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
136 <td></td>
f743c238d2e5 Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents: 153
diff changeset
137 </tr>
113
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
138 </table>
b0250c4ea62a config with cache info
robcast
parents: 74
diff changeset
139
463
6f4a64f6e846 Servlet version 1.10b
robcast
parents: 354
diff changeset
140 <h2>DocuImage configuration</h2>
354
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
141
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
142 <p>Supported image types</p>
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
143 <ul>
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
144 <%
463
6f4a64f6e846 Servlet version 1.10b
robcast
parents: 354
diff changeset
145 java.util.Iterator dlfs = dlConfig.getDocuImageInstance().getSupportedFormats();
6f4a64f6e846 Servlet version 1.10b
robcast
parents: 354
diff changeset
146 for (Object f = dlfs.next(); dlfs.hasNext(); f = dlfs.next()) {
354
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
147 %>
463
6f4a64f6e846 Servlet version 1.10b
robcast
parents: 354
diff changeset
148 <li><%= (String)f %></li>
354
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
149 <%
463
6f4a64f6e846 Servlet version 1.10b
robcast
parents: 354
diff changeset
150 }
354
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
151 %>
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
152 </ul>
5d4d9528a07f digilib status shows ImageIO's types of supported images
robcast
parents: 338
diff changeset
153
463
6f4a64f6e846 Servlet version 1.10b
robcast
parents: 354
diff changeset
154
74
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
155 </body>
fcc9030be367 New servlet version 1.5b.
robcast
parents:
diff changeset
156 </html>