blob: b22787a203ae8c6d1c976c4fb2454036a1e15a22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<!DOCTYPE>
<%@page import="com.vaadin.ui.UI"%>
<%@page import="com.vaadin.server.VaadinSession"%>
<HTML>
<HEAD>
<TITLE>JSP integration</TITLE>
<style>
table {
background: #fff;
}
td {
border: 1px solid black;
padding: .5em;
}
</style>
</HEAD>
<BODY>
<table>
<tr>
<th align="left" colspan=4>Available UIs:</th>
</tr>
<tr>
<th>Service Name</th>
<th>CSRF token</th>
<th>UI id</th>
<th>UI type</th>
<th>Main content</th>
</tr>
<%
HttpSession httpSession = request.getSession(false);
for (VaadinSession vs : VaadinSession.getAllSessions(httpSession)) {
try {
vs.lock();
for (UI ui : vs.getUIs()) {
out.append("<tr class='uirow'>");
out.append("<td>" + vs.getService().getServiceName()
+ "</td>");
out.append("<td>" + vs.getCsrfToken() + "</td>");
out.append("<td>" + ui.getUIId() + "</td>");
out.append("<td>" + ui.getClass().getName() + "</td>");
out.append("<td>" + ui.getContent().getClass().getName() + "</td>");
out.append("</tr>");
}
} finally {
vs.unlock();
}
}
%>
</table>
</BODY>
</HTML>
|