音讯存到application里 然后定时刷新application
群聊
用Ajax 大约的代码 本人整理吧
a.jsp// 音讯处置
String mess=request.getParameter(/"mess/");
String username=request.getParameter(/"username/");
String s=application.getAttribute(/"umess/");
s=s+/"
/"+username+/"说:/"+mess;
application.setAttribute(/"umess/",s);
response.sendRedirect(/"say.jsp/");
say.jsp//说话
mess.jsp//音讯显现 刷新本页
<%
String s=application.getAttribute(/"umess/");
%>
<%=s %>
username 能够用session取得 简单的思绪 本人渐渐改吧