Author: markt Date: Fri Aug 31 10:03:40 2018 New Revision: 1839741 URL: http://svn.apache.org/viewvc?rev=1839741&view=rev Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=62662 Fix the corruption of web.xml output during JSP compilation caused by the fix for 53492. Patch provided by Bernhard Frauendienst.
Modified: tomcat/trunk/java/org/apache/jasper/JspC.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/jasper/JspC.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1839741&r1=1839740&r2=1839741&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/JspC.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspC.java Fri Aug 31 10:03:40 2018 @@ -1167,19 +1167,22 @@ public class JspC extends Task implement } if (servletout != null) { - servletout.write("\n <servlet>\n <servlet-name>"); - servletout.write(thisServletName); - servletout.write("</servlet-name>\n <servlet-class>"); - servletout.write(thisServletName); - servletout.write("</servlet-class>\n </servlet>\n"); + synchronized(servletout) { + servletout.write("\n <servlet>\n <servlet-name>"); + servletout.write(thisServletName); + servletout.write("</servlet-name>\n <servlet-class>"); + servletout.write(thisServletName); + servletout.write("</servlet-class>\n </servlet>\n"); + } } if (mappingout != null) { - mappingout.write("\n <servlet-mapping>\n <servlet-name>"); - mappingout.write(thisServletName); - mappingout.write("</servlet-name>\n <url-pattern>"); - mappingout.write(file.replace('\\', '/')); - mappingout.write("</url-pattern>\n </servlet-mapping>\n"); - + synchronized(mappingout) { + mappingout.write("\n <servlet-mapping>\n <servlet-name>"); + mappingout.write(thisServletName); + mappingout.write("</servlet-name>\n <url-pattern>"); + mappingout.write(file.replace('\\', '/')); + mappingout.write("</url-pattern>\n </servlet-mapping>\n"); + } } } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1839741&r1=1839740&r2=1839741&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Fri Aug 31 10:03:40 2018 @@ -76,6 +76,11 @@ Correct the JSP version in the X-PoweredBy HTTP header generated when the xpoweredBy option is enabled. (markt) </fix> + <fix> + <bug>62662</bug>: Fix the corruption of web.xml output during JSP + compilation caused by the fix for <bug>53492</bug>. Patch provided by + Bernhard Frauendienst. (markt) + </fix> </changelog> </subsection> <subsection name="Web applications"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org