tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Blakeslee, Todd" <Blak...@diebold.com>
Subject [PATCH] Fixes servlet-mapping in web.xml file generated by JspC u sing the -webxml and -webinc options
Date Fri, 07 Sep 2001 18:02:53 GMT
This patch fixes the following bug reports. Testing on Windows 2000 w/ SP2, JDK 1.3.1, and
jakarta-tomcat-4.0-20010906.

web.xml file generated by JspC is not valid as defined by DTD.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3474

Invalid url-pattern for servlet-mapping in web.xml file generated by JspC on Windows OS.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3499

---------------------------------------------------------------------- 

cvs diff -u D:/Tomcat4-cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java

Index: D:/Tomcat4-cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java,v
retrieving revision 1.8
diff -u -r1.8 JspC.java
--- D:/Tomcat4-cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java	2001/02/04
01:03:42	1.8
+++ D:/Tomcat4-cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/JspC.java	2001/09/07
16:46:10
@@ -400,11 +400,11 @@
                 servletout.write("</servlet-class>\n\t</servlet>\n");
             }
             if (mappingout != null) {
-                mappingout.write("\n\t<servlet-mapping>\n\t\t<url-pattern>");
-                mappingout.write(file);
-                mappingout.write("</url-pattern>\n\t\t<servlet-name>");
+                mappingout.write("\n\t<servlet-mapping>\n\t\t<servlet-name>");
                 mappingout.write(thisServletName);
-                mappingout.write("</servlet-name>\n\t</servlet-mapping>\n");
+                mappingout.write("</servlet-name>\n\t\t<url-pattern>");
+                mappingout.write(file.replace('\\', '/'));
+                mappingout.write("</url-pattern>\n\t</servlet-mapping>\n");
             }
             return true;
         } catch (JasperException je) {

*****CVS exited normally with code 1*****

---------------------------------------------------------------------- 
Todd R. Blakeslee [mailto:blakest@diebold.com]

Mime
View raw message