Improve the ChatServlet comet example.
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 17 Apr 2010 01:59:56 +0000 (01:59 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 17 Apr 2010 01:59:56 +0000 (01:59 +0000)
commita4be94db7ed30f8c88ec659af75440252dba27bd
treee3faccecaa238f7e65050e3218e26a9e6fe29a85
parentd23ff17bd41104157f92127778fecd8dcb4397df
Improve the ChatServlet comet example.
1. Fix possible deadlock in ChatServlet$MessageSender, similar to BZ 48843.
2. Properly wake up ChatServlet$MessageSender when the servlet is destroyed.
3. Filter special characters when printing the message in ChatServlet.
4. Provide an explicit charset everywhere.
5. Fix frames layout. Fix redirections.
Use target="<name>" attribute in HTML to send request to a particular frame.
6. Fix DTDs. Use frameset DTD for the page containing frames.
7. Add "xxx joined the chat" message at startup.
8. Rename chat.jsp -> index.jsp, so that the entry point to this example is more visible.
9. Corrected the link that opens a new chat window. It referenced an undefined JavaScript function. Now it is implemented just by using target="_blank".
10. Added submit button to the form pages.
11. Minor message tweaks.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@935105 13f79535-47bb-0310-9956-ffa450edef68
webapps/examples/WEB-INF/classes/chat/ChatServlet.java
webapps/examples/jsp/chat/chat.jsp [deleted file]
webapps/examples/jsp/chat/index.jsp [new file with mode: 0644]
webapps/examples/jsp/chat/login.jsp
webapps/examples/jsp/chat/post.jsp