WebSocket It's a demo for Tomcat7'Websocket 新事物,旧协议 不过在Tomcat8中将WebSocketServlet废弃了 :( Websocket和普通的轮询相比性能没有实际测试过,试试…… 这是通过Tomcat7官网的demo实例了一个,仅供学习