Author: markt Date: Sat May 19 07:23:07 2007 New Revision: 539759 URL: http://svn.apache.org/viewvc?view=rev&rev=539759 Log: Simplify example. Prevent XSS.
Modified: tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/src/mypackage/Hello.java tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/web/hello.jsp Modified: tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/src/mypackage/Hello.java URL: http://svn.apache.org/viewvc/tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/src/mypackage/Hello.java?view=diff&rev=539759&r1=539758&r2=539759 ============================================================================== --- tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/src/mypackage/Hello.java (original) +++ tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/src/mypackage/Hello.java Sat May 19 07:23:07 2007 @@ -69,22 +69,9 @@ 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. It displays the"); - writer.println("request headers from the request we are currently"); - writer.println("processing."); + writer.println("the Hello, World application."); writer.println("</td>"); writer.println("</tr>"); - writer.println("</table>"); - - writer.println("<table border=\"0\" width=\"100%\">"); - Enumeration names = request.getHeaderNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - writer.println("<tr>"); - writer.println(" <th align=\"right\">" + name + ":</th>"); - writer.println(" <td>" + request.getHeader(name) + "</td>"); - writer.println("</tr>"); - } writer.println("</table>"); writer.println("</body>"); Modified: tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/web/hello.jsp URL: http://svn.apache.org/viewvc/tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/web/hello.jsp?view=diff&rev=539759&r1=539758&r2=539759 ============================================================================== --- tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/web/hello.jsp (original) +++ tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/appdev/sample/web/hello.jsp Sat May 19 07:23:07 2007 @@ -12,33 +12,12 @@ <td> <h1>Sample Application JSP Page</h1> This is the output of a JSP page that is part of the Hello, World -application. It displays several useful values from the request -we are currently processing. +application. </td> </tr> </table> -<table border="0" border="100%"> -<tr> - <th align="right">Context Path:</th> - <td align="left"><%= request.getContextPath() %></td> -</tr> -<tr> - <th align="right">Path Information:</th> - <td align="left"><%= request.getPathInfo() %></td> -</tr> -<tr> - <th align="right">Query String:</th> - <td align="left"><%= request.getQueryString() %></td> -</tr> -<tr> - <th align="right">Request Method:</th> - <td align="left"><%= request.getMethod() %></td> -</tr> -<tr> - <th align="right">Servlet Path:</th> - <td align="left"><%= request.getServletPath() %></td> -</tr> -</table> +<%= new String("Hello!") %> + </body> </html> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]