<%@ page import="java.util.*" %> <%@ page import="java.io.*" %> <%@ page import="java.text.*" %> <%@ page import="com.hof.util.*" %> <%@ page import="com.hof.data.*" %> <%@ page import="com.hof.process.BuildDataProcess" %> <%@ page import="com.hof.servlet.SysSessionListener" %> <%@ page import="java.lang.ref.WeakReference" %> <%! private String dateString(long l) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd h:mm:ss a (z)"); return sdf.format(new java.util.Date(l)); } private String secString(int sec) { int h = Math.abs(sec / 3600); int m = Math.abs((sec / 60) % 60); int s = Math.abs(sec % 60); String str = ""; if (sec < 0) str = "-"; str += h + ":"; if (m < 10) str += "0"; str += m + ":"; if (s < 10) str += "0"; str += s; return str; } %>

Session Information

Session Count

SysSessionListener.getCurrentSessions(): <%=SysSessionListener.getCurrentSessions()%>

Session Information

<% SessionBean sb = null; int sec; long now = System.currentTimeMillis(); boolean valid; ArrayList slist = SysSessionListener.getCurrentSessionList(); for (HttpSession sss: slist) { try { sb = (SessionBean)sss.getAttribute(Const.SESSION_BEAN); valid = true; } catch (Exception e) { sb = null; valid = false; } %> <% if (valid) { sec = (int)(sss.getMaxInactiveInterval() - ((now - sss.getLastAccessedTime()) / 1000)); %> <% if (sb == null) { %> <% } else { if (sb.isLoggedOn()) { %> <% } else { %> <% } %> <% if (sb.getCurrRole() == null) { %> <% } else { %> <% } %> <% } } else { %> <% } %> <% sss = null; } slist = null; %>
SessionId CreationTime LastAccessedTime MaxInactiveInterval Timeout In YF Session YF IpPerson YF PersonName YF Role YF Guest Role RemoteHost
<%=sss.getId()%><%=dateString(sss.getCreationTime())%> <%=dateString(sss.getLastAccessedTime())%> <%=secString(sss.getMaxInactiveInterval())%> <%=secString(sec)%>null Logged InNot Logged In<%=sb.getPrsnBean() == null ? null : sb.getPrsnBean().getIpPerson()%> <%=sb.getPrsnBean() == null ? null : sb.getPrsnBean().getFormattedFullName()%>null <%=sb.getCurrRole().getRoleDescription()%> <%=sb.getCurrRole().isGuest()%><%=sb.getRemoteHost()%>Session invalidated