How would you solve the ChatRoom problem where you use chat.jsp instead of chat.html and you have a param roomID which specifies which ChatRoom to show. So calling chat.jsp?roomID=Room1 opens Room1 and chat.jsp?roomID=Room2 opens Room2.
Now, using
String currentPage = wctx.getCurrentPage();
Collection<ScriptSession> sessions = wctx.getScriptSessionsByPage(currentPage);
Util utilAll = new Util(sessions);
utilAll.addScript(new ScriptBuffer(js));
Sends js to ALL rooms :((
Any ideas how to solve this? |