tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1345382 - in /tomcat/tc6.0.x/trunk: ./ webapps/docs/ webapps/examples/WEB-INF/classes/
Date Fri, 01 Jun 2012 22:53:15 GMT
Author: kkolinko
Date: Fri Jun  1 22:53:14 2012
New Revision: 1345382

URL: http://svn.apache.org/viewvc?rev=1345382&view=rev
Log:
Fix several HTML markup errors in example servlets
e.g. duplicate <body> tag preceding <head> and <tr> following </table>

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1345382&r1=1345381&r2=1345382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jun  1 22:53:14 2012
@@ -162,13 +162,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
-* Fix several trivial HTML markup errors in example servlets
-  e.g. duplicate <body> tag preceding <head> and <tr> following </table>
-  http://people.apache.org/~kkolinko/patches/2012-05-13_tc6_sampleservlets.patch
-  (backport of revs 1337719 1337734 1337741 1337745)
-  +1: kkolinko, rjung, markt
-  -1:
-
 * https://issues.apache.org/bugzilla/show_bug.cgi?id=52055#c14
   Correctly reset ChunkedInputFilter.needCRLFParse flag when the filter is
   recycled.

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1345382&r1=1345381&r2=1345382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Jun  1 22:53:14 2012
@@ -203,6 +203,10 @@
         Correct documentation for <code>enableLookups</code> attribute
         of a Connector. By default DNS lookups are disabled. (kkolinko)
       </fix>
+      <fix>
+        Fix several HTML markup errors in servlets of examples web application.
+        (kkolinko)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">

Modified: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java?rev=1345382&r1=1345381&r2=1345382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java (original)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/CookieExample.java Fri Jun  1 22:53:14
2012
@@ -43,13 +43,12 @@ public class CookieExample extends HttpS
 
         PrintWriter out = response.getWriter();
         out.println("<html>");
-        out.println("<body bgcolor=\"white\">");
         out.println("<head>");
 
         String title = rb.getString("cookies.title");
         out.println("<title>" + title + "</title>");
         out.println("</head>");
-        out.println("<body>");
+        out.println("<body bgcolor=\"white\">");
 
 	// relative links
 

Modified: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java?rev=1345382&r1=1345381&r2=1345382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java (original)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestHeaderExample.java Fri Jun
 1 22:53:14 2012
@@ -43,13 +43,12 @@ public class RequestHeaderExample extend
 
         PrintWriter out = response.getWriter();
         out.println("<html>");
-        out.println("<body bgcolor=\"white\">");
         out.println("<head>");
 
         String title = rb.getString("requestheader.title");
         out.println("<title>" + title + "</title>");
         out.println("</head>");
-        out.println("<body>");
+        out.println("<body bgcolor=\"white\">");
 
 	// all links relative
 

Modified: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java?rev=1345382&r1=1345381&r2=1345382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java (original)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestInfoExample.java Fri Jun
 1 22:53:14 2012
@@ -44,7 +44,6 @@ public class RequestInfoExample extends 
 
         PrintWriter out = response.getWriter();
         out.println("<html>");
-        out.println("<body>");
         out.println("<head>");
 
         String title = rb.getString("requestinfo.title");
@@ -70,7 +69,7 @@ public class RequestInfoExample extends 
         out.println("<table border=0><tr><td>");
         out.println(rb.getString("requestinfo.label.method"));
         out.println("</td><td>");
-        out.println(request.getMethod());
+        out.println(HTMLFilter.filter(request.getMethod()));
         out.println("</td></tr><tr><td>");
         out.println(rb.getString("requestinfo.label.requesturi"));
         out.println("</td><td>");
@@ -78,29 +77,28 @@ public class RequestInfoExample extends 
         out.println("</td></tr><tr><td>");
         out.println(rb.getString("requestinfo.label.protocol"));
         out.println("</td><td>");
-        out.println(request.getProtocol());
+        out.println(HTMLFilter.filter(request.getProtocol()));
         out.println("</td></tr><tr><td>");
         out.println(rb.getString("requestinfo.label.pathinfo"));
         out.println("</td><td>");
         out.println(HTMLFilter.filter(request.getPathInfo()));
         out.println("</td></tr><tr><td>");
         out.println(rb.getString("requestinfo.label.remoteaddr"));
-
-        String cipherSuite=
-            (String)request.getAttribute("javax.servlet.request.cipher_suite");
         out.println("</td><td>");
-        out.println(request.getRemoteAddr());
-        out.println("</table>");
+        out.println(HTMLFilter.filter(request.getRemoteAddr()));
+        out.println("</td></tr>");
 
+        String cipherSuite=
+                (String)request.getAttribute("javax.servlet.request.cipher_suite");
         if(cipherSuite!=null){
-            out.println("</td></tr><tr><td>");
+            out.println("<tr><td>");
             out.println("SSLCipherSuite:");
-            out.println("</td>");
-            out.println("<td>");
-            out.println(request.getAttribute("javax.servlet.request.cipher_suite"));
-            out.println("</td>");
+            out.println("</td><td>");
+            out.println(HTMLFilter.filter(cipherSuite));
+            out.println("</td></tr>");
         }
 
+        out.println("</table>");
     }
 
     public void doPost(HttpServletRequest request,

Modified: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java?rev=1345382&r1=1345381&r2=1345382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java (original)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/RequestParamExample.java Fri Jun
 1 22:53:14 2012
@@ -44,7 +44,6 @@ public class RequestParamExample extends
 
         PrintWriter out = response.getWriter();
         out.println("<html>");
-        out.println("<body>");
         out.println("<head>");
 
         String title = rb.getString("requestparams.title");

Modified: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java?rev=1345382&r1=1345381&r2=1345382&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java (original)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/SessionExample.java Fri Jun  1 22:53:14
2012
@@ -43,13 +43,12 @@ public class SessionExample extends Http
 
         PrintWriter out = response.getWriter();
         out.println("<html>");
-        out.println("<body bgcolor=\"white\">");
         out.println("<head>");
 
         String title = rb.getString("sessions.title");
         out.println("<title>" + title + "</title>");
         out.println("</head>");
-        out.println("<body>");
+        out.println("<body bgcolor=\"white\">");
 
         // img stuff not req'd for source code html showing
 	// relative links everywhere!
@@ -120,14 +119,11 @@ public class SessionExample extends Http
         out.println("</form>");
 
         out.print("<p><a href=\"");
-	out.print(response.encodeURL("SessionExample?dataname=foo&datavalue=bar"));
-	out.println("\" >URL encoded </a>");
+        out.print(HTMLFilter.filter(response.encodeURL("SessionExample?dataname=foo&datavalue=bar")));
+        out.println("\" >URL encoded </a>");
 	
         out.println("</body>");
         out.println("</html>");
-        
-        out.println("</body>");
-        out.println("</html>");
     }
 
     public void doPost(HttpServletRequest request,



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message