Fix some html smells
authorpero <pero@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 30 Oct 2006 18:06:52 +0000 (18:06 +0000)
committerpero <pero@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 30 Oct 2006 18:06:52 +0000 (18:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@469211 13f79535-47bb-0310-9956-ffa450edef68

webapps/examples/WEB-INF/classes/chat/ChatServlet.java

index 243197e..f27c3c0 100644 (file)
@@ -114,7 +114,7 @@ public class ChatServlet
         
         PrintWriter writer = response.getWriter();
         writer.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">");
-        writer.println("<head><title>JSP Chat</title></head><body bgcolor=\"#FFFFFF\">");
+        writer.println("<html><head><title>JSP Chat</title></head><body bgcolor=\"#FFFFFF\">");
         writer.flush();
 
         synchronized(connections) {
@@ -166,7 +166,7 @@ public class ChatServlet
         // Compatibility method: equivalent method using the regular connection model
         PrintWriter writer = response.getWriter();
         writer.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">");
-        writer.println("<head><title>JSP Chat</title></head><body bgcolor=\"#FFFFFF\">");
+        writer.println("<html><head><title>JSP Chat</title></head><body bgcolor=\"#FFFFFF\">");
         writer.println("Chat example only supports Comet processing");
         writer.println("</body></html>");
     }
@@ -233,7 +233,7 @@ public class ChatServlet
                             PrintWriter writer = connections.get(i).getWriter();
                             for (int j = 0; j < pendingMessages.length; j++) {
                                 // FIXME: Add HTML filtering
-                                writer.println(pendingMessages[j] + "<br>");
+                                writer.println(pendingMessages[j] + "<br/>");
                             }
                             writer.flush();
                         } catch (IOException e) {