<%



    ThreadGroup currentGroup = Thread.currentThread().getThreadGroup();

    int noThreads = currentGroup.activeCount();
    Thread[] lstThreads = new Thread[noThreads];
    currentGroup.enumerate(lstThreads);
%>

<table>
    <thead>
        <tr>
            <th>ID</th>
            <th>Name</th>
            <th>Alive</th>
            <th>Deamon</th>
            <th>Interrupted</th>
            <th>Class</th>
            <th>Priority</th>
            <th>ClassLoader</th>
        </tr>
    </thead>
    <tbody>
    <% for (int i = 0; i < noThreads; i++) { %>
    <%  Thread thread = lstThreads[i]; %>
        <tr>
            <td><%=i%></td>
            <td><%=thread.getName()%></td>
            <td><%=thread.isAlive()%></td>
            <td><%=thread.isDaemon()%></td>
            <td><%=thread.isInterrupted()%></td>
            <td><%=thread.getClass()%></td>
            <td><%=thread.getPriority()%></td>
            <td><%=thread.getContextClassLoader()%></td>
        </tr>
    <% } %>
    </tbody>
</table>

