tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Mathewson <ni...@MIT.EDU>
Subject BUG&FIX: Generated do not conform to DTD
Date Thu, 17 Aug 2000 16:14:57 GMT

Hello, all.  Please forgive me if I'm submitting this bug incorrectly;
I wasn't able to find more specific instructions at the website.

The problem is this:  when generates or web.xml, it
produces something like this:

This is incorrect; according to p.65 of Sun's servlet specification 2.2,
the servlet-name element must precede the url-pattern element. 

This problem definitely exists in the stable release (3.1r*), and [as far
as I can tell from inspecting the code] exists in all CVS version as well.

Here is a patch against the stable release; patching the CVS version should
be trivial.

diff -ur jakarta-orig/src/share/org/apache/jasper/ jakarta-tomcat/src/share/org/apache/jasper/
--- jakarta-orig/src/share/org/apache/jasper/	    Wed Mar 29 23:28:06 2000+++ jakarta-tomcat/src/share/org/apache/jasper/
Thu Aug 17 11:58:23 2000
@@ -370,11 +370,11 @@
-                mapout.write("</servlet-class>\n\t</servlet>\n\t<servlet-mapping>\n\t\t<url-pattern>");
-                mapout.write(file);
-                mapout.write("</url-pattern>\n\t\t<servlet-name>");
+                mapout.write("</servlet-class>\n\t</servlet>\n\t<servlet-mapping>\n\t\t<servlet-name>");
-                mapout.write("</servlet-name>\n\t</servlet-mapping>\n");
+                mapout.write("</servlet-name>\n\t\t<url-pattern>");
+                mapout.write(file);
+                mapout.write("</url-pattern>\n\t</servlet-mapping>\n");
             return true;
         } catch (JasperException je) {



View raw message