You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kp...@apache.org on 2013/11/08 16:15:38 UTC

svn commit: r1540070 - in /tomcat/trunk/webapps/examples: WEB-INF/tags/xhtmlbasic.tag jsp/jsp2/jspx/basic.jspx

Author: kpreisser
Date: Fri Nov  8 15:15:38 2013
New Revision: 1540070

URL: http://svn.apache.org/r1540070
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55383
Improve markup of XHTML Basic JSPX example:
- Since it is intented to be XHTML, change it to actually output XHTML instead of malformed HTML.
- Simplify by moving the DOCTYPE declaration into the file itself (Note that my understanding is that HTML5 obsoletes XHTML 1.x DOCTYPES so the DOCTYPE probably can be removed - I don't know if there is actually software that interpretes XHTML documents which are limited to an XHTML 1.1 Basic scheme).

Removed:
    tomcat/trunk/webapps/examples/WEB-INF/tags/xhtmlbasic.tag
Modified:
    tomcat/trunk/webapps/examples/jsp/jsp2/jspx/basic.jspx

Modified: tomcat/trunk/webapps/examples/jsp/jsp2/jspx/basic.jspx
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/jsp2/jspx/basic.jspx?rev=1540070&r1=1540069&r2=1540070&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/jsp/jsp2/jspx/basic.jspx (original)
+++ tomcat/trunk/webapps/examples/jsp/jsp2/jspx/basic.jspx Fri Nov  8 15:15:38 2013
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -14,17 +15,18 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<tags:xhtmlbasic xmlns:tags="urn:jsptagdir:/WEB-INF/tags"
-                 xmlns:jsp="http://java.sun.com/JSP/Page"
-                 xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
-                 xmlns="http://www.w3.org/1999/xhtml">
-  <jsp:directive.page contentType="text/html" />
+<html xmlns:jsp="http://java.sun.com/JSP/Page"
+      xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
+      xmlns="http://www.w3.org/1999/xhtml">
+  <jsp:output doctype-root-element="html"  
+              doctype-public="-//W3C//DTD XHTML Basic 1.0//EN"  
+              doctype-system="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"/>  
+  <jsp:directive.page contentType="application/xhtml+xml" />
   <head>
     <title>JSPX - XHTML Basic Example</title>
   </head>
   <body>
     <h1>JSPX - XHTML Basic Example</h1>
-    <hr/>
     This example illustrates how to use JSPX to produce an XHTML basic
     document suitable for use with mobile phones, televisions,
     PDAs, vending machines, pagers, car navigation systems,
@@ -35,12 +37,12 @@
     required &amp;lt;jsp:root&amp;gt; to be the root element of the document.
     This is no longer the case in JSP 2.0.
     <p/>
-    This particular example uses a tag file to produce the DOCTYPE and
+    This particular example uses
     namespace declarations to make the output of this page a valid XHTML
-    Basic document.
+    document.
     <p/>
     Just to prove this is live, here's some dynamic content:
     <jsp:useBean id="now" class="java.util.Date" />
     <fmt:formatDate value="${now}" pattern="MMMM d, yyyy, H:mm:ss"/>
   </body>
-</tags:xhtmlbasic>
+</html>



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