diff options
author | Artur Signell <artur@vaadin.com> | 2014-01-13 13:50:34 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2014-01-13 15:27:54 +0200 |
commit | 0e7ac388039cf8140f37df9d83cf62b9efc95bb8 (patch) | |
tree | 35e12749c80b6a22d7dccf37aaa816b77dca92f4 /WebContent/statictestfiles | |
parent | d4695494591bccb7b1dd4358133f8b5e854c3cbb (diff) | |
download | vaadin-framework-0e7ac388039cf8140f37df9d83cf62b9efc95bb8.tar.gz vaadin-framework-0e7ac388039cf8140f37df9d83cf62b9efc95bb8.zip |
Method for retrieving all VaadinSessions inside a HTTP session (#13053)
Change-Id: I8e612ccd521d99f6b7ec6d10c72331b4d4373abe
Diffstat (limited to 'WebContent/statictestfiles')
-rw-r--r-- | WebContent/statictestfiles/vaadinsessions.jsp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/WebContent/statictestfiles/vaadinsessions.jsp b/WebContent/statictestfiles/vaadinsessions.jsp new file mode 100644 index 0000000000..b22787a203 --- /dev/null +++ b/WebContent/statictestfiles/vaadinsessions.jsp @@ -0,0 +1,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>
\ No newline at end of file |