Mercurial > hg > digilib
annotate client/src/main/webapp/server/dlConfig.jsp @ 883:7ffb45138f61 mvnify
rearrange sources to maven directory standard
| author | robcast |
|---|---|
| date | Tue, 19 Apr 2011 18:44:25 +0200 |
| parents | client/digitallibrary/server/dlConfig.jsp@480c3553c8d2 |
| children |
| rev | line source |
|---|---|
| 553 | 1 <%@page import="digilib.util.DigilibJobCenter"%> |
| 74 | 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 | |
|
164
f743c238d2e5
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
153
diff
changeset
|
27 dlRequest.setValue("pt", docBean.getNumPages(dlRequest)); |
| 150 | 28 // dir cache |
| 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 | 33 %> |
| 34 | |
| 35 <html> | |
| 36 <head> | |
| 37 <title>Digilib configuration page</title> | |
| 38 </head> | |
|
354
5d4d9528a07f
digilib status shows ImageIO's types of supported images
robcast
parents:
338
diff
changeset
|
39 <body> |
| 74 | 40 |
| 41 <h1>Global servlet configuration</h1> | |
| 42 | |
| 43 <table> | |
|
164
f743c238d2e5
Servlet Version 1.16b2 with new DigilibParameter code.
robcast
parents:
153
diff
changeset
|
44 <% |
| 544 | 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 | 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 | 66 <td></td> |
| 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 | 71 </table> |
| 72 | |
| 338 | 73 <h2>Threads</h2> |
| 74 | |
| 75 <table> | |
| 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 | 78 <td></td> |
| 79 </tr> | |
| 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 | 82 <td></td> |
| 83 </tr> | |
| 84 </table> | |
| 85 | |
| 113 | 86 <h2>Directory cache</h2> |
| 87 | |
| 88 <table> | |
| 89 <tr> | |
| 150 | 90 <td>size (directories)</td><td><b><%= dirCache.size() %></b></td> |
| 113 | 91 <td></td> |
| 92 </tr> | |
| 93 <tr> | |
| 150 | 94 <td>numFiles</td><td><b><%= dirCache.getNumFiles() %></b></td> |
| 113 | 95 <td></td> |
| 96 </tr> | |
| 97 <tr> | |
| 150 | 98 <td>hits</td><td><b><%= dirCache.getHits() %></b></td> |
| 113 | 99 <td></td> |
| 100 </tr> | |
| 101 <tr> | |
| 150 | 102 <td>misses</td><td><b><%= dirCache.getMisses() %></b></td> |
| 113 | 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> | |
| 150 | 114 <tr> |
| 115 <td>java.version</td><td><b><%= System.getProperty("java.version") %></b></td> | |
| 116 <td></td> | |
| 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 | 138 </table> |
| 139 | |
| 463 | 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 | 145 java.util.Iterator dlfs = dlConfig.getDocuImageInstance().getSupportedFormats(); |
| 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 | 148 <li><%= (String)f %></li> |
|
354
5d4d9528a07f
digilib status shows ImageIO's types of supported images
robcast
parents:
338
diff
changeset
|
149 <% |
| 463 | 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 | 154 |
| 74 | 155 </body> |
| 156 </html> |
