@SuppressWarnings("deprecation")
public void onApplicationEvent(ApplicationEvent event) {
//����¼�������ChatMessageEvent��ִ���������
if (event instanceof ChatMessageEvent) {
Message msg = (Message) event.getSource();
ServerContext context = ServerContextFactory.get();
//��ÿͻ�������chatҳ��script session������
Collection<ScriptSession> sessions = context.getScriptSessionsByPage(((ServerContext) ctx).getContextPath() + "/chat.jsp");
for (ScriptSession session : sessions) {
ScriptBuffer sb = new ScriptBuffer();
Date time = msg.getTime();
@SuppressWarnings("deprecation")
String s = time.getYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate() + " "