Author: kpreisser Date: Sun Oct 6 20:43:20 2013 New Revision: 1529678 URL: http://svn.apache.org/r1529678 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 Improve HTML markup of "sample" webb application.
Modified: tomcat/trunk/webapps/docs/appdev/sample/index.html tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java tomcat/trunk/webapps/docs/appdev/sample/web/hello.jsp tomcat/trunk/webapps/docs/appdev/sample/web/index.html Modified: tomcat/trunk/webapps/docs/appdev/sample/index.html URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/sample/index.html?rev=1529678&r1=1529677&r2=1529678&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/appdev/sample/index.html (original) +++ tomcat/trunk/webapps/docs/appdev/sample/index.html Sun Oct 6 20:43:20 2013 @@ -1,3 +1,4 @@ +<!DOCTYPE html> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,6 +17,7 @@ --> <html> <head> +<meta charset="UTF-8" /> <meta name="author" content="Ben Souther" /> <title>Sample Application</title> </head> Modified: tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java?rev=1529678&r1=1529677&r2=1529678&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java (original) +++ tomcat/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java Sun Oct 6 20:43:20 2013 @@ -54,30 +54,29 @@ public final class Hello extends HttpSer throws IOException, ServletException { response.setContentType("text/html"); - PrintWriter writer = response.getWriter(); - - writer.println("<html>"); - writer.println("<head>"); - writer.println("<title>Sample Application Servlet Page</title>"); - writer.println("</head>"); - writer.println("<body bgcolor=white>"); - - writer.println("<table border=\"0\">"); - writer.println("<tr>"); - writer.println("<td>"); - writer.println("<img src=\"images/tomcat.gif\">"); - writer.println("</td>"); - writer.println("<td>"); - writer.println("<h1>Sample Application Servlet</h1>"); - writer.println("This is the output of a servlet that is part of"); - writer.println("the Hello, World application."); - writer.println("</td>"); - writer.println("</tr>"); - writer.println("</table>"); - - writer.println("</body>"); - writer.println("</html>"); + response.setCharacterEncoding("UTF-8"); + try (PrintWriter writer = response.getWriter()) { + writer.println("<!DOCTYPE html><html>"); + writer.println("<head>"); + writer.println("<meta charset=\"UTF-8\" />"); + writer.println("<title>Sample Application Servlet Page</title>"); + writer.println("</head>"); + writer.println("<body>"); + + + writer.println("<div style=\"float: left; padding: 10px;\">"); + writer.println("<img src=\"images/tomcat.gif\" alt=\"\" />"); + writer.println("</div>"); + writer.println("<h1>Sample Application Servlet</h1>"); + writer.println("<p>"); + writer.println("This is the output of a servlet that is part of"); + writer.println("the Hello, World application."); + writer.println("</p>"); + + writer.println("</body>"); + writer.println("</html>"); + } } Modified: tomcat/trunk/webapps/docs/appdev/sample/web/hello.jsp URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/sample/web/hello.jsp?rev=1529678&r1=1529677&r2=1529678&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/appdev/sample/web/hello.jsp (original) +++ tomcat/trunk/webapps/docs/appdev/sample/web/hello.jsp Sun Oct 6 20:43:20 2013 @@ -1,4 +1,4 @@ -<!-- +<%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -13,25 +13,23 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ---> +--%> +<%@ page session="false" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<!DOCTYPE html> <html> <head> +<meta charset="UTF-8" /> <title>Sample Application JSP Page</title> </head> -<body bgcolor=white> +<body> -<table border="0"> -<tr> -<td align=center> -<img src="images/tomcat.gif"> -</td> -<td> +<div style="float: left; padding: 10px;"> +<img src="images/tomcat.gif" alt="" /> +</div> <h1>Sample Application JSP Page</h1> This is the output of a JSP page that is part of the Hello, World application. -</td> -</tr> -</table> + <%= new String("Hello!") %> Modified: tomcat/trunk/webapps/docs/appdev/sample/web/index.html URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/sample/web/index.html?rev=1529678&r1=1529677&r2=1529678&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/appdev/sample/web/index.html (original) +++ tomcat/trunk/webapps/docs/appdev/sample/web/index.html Sun Oct 6 20:43:20 2013 @@ -1,4 +1,4 @@ -<!-- +<!DOCTYPE html><!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -16,23 +16,18 @@ --> <html> <head> +<meta charset="UTF-8" /> <title>Sample "Hello, World" Application</title> </head> -<body bgcolor=white> +<body> -<table border="0"> -<tr> -<td> -<img src="images/tomcat.gif"> -</td> -<td> +<div style="float: left; padding: 10px;"> +<img src="images/tomcat.gif" alt="" /> +</div> <h1>Sample "Hello, World" Application</h1> <p>This is the home page for a sample application used to illustrate the source directory organization of a web application utilizing the principles outlined in the Application Developer's Guide. -</td> -</tr> -</table> <p>To prove that they work, you can execute either of the following links:</p> <ul> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org