统计在线人数及ip
jsp页面
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2019/11/29
Time: 16:26
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*,com.dao.*"
pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>在线人数统计</title>
</head>
<body>
当前在线人数:${
number }<br>
<table border="1" cellspacing="0" width="500px">
<tr>
<td>id</td>
<td>ip</td>
<td>firstTime</td>
</tr>
<%-- <c:choose>
<c:when test=" ${not empty userList }" >
<c:forEach var="list" items="${applicationScope.userList }">
<tr>
<td>${
list.ssessionIdString }</td>
<td>${
list.ipString }</td>
<td>${
list.firsttTimeString }</td>
</tr>