Bug 62721 - Jasper generates incomplete web.xml 3.1 header
Summary: Jasper generates incomplete web.xml 3.1 header
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 8.5.32
Hardware: Macintosh All
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-14 11:02 UTC by Chris Bonham
Modified: 2018-09-14 13:36 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bonham 2018-09-14 11:02:23 UTC
Since 8.5.32, Jasper generates an incomplete web.xml 3.1 header:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    <servlet>
        <servlet-name>org.apache.jsp.health_jsp</servlet-name>
        <servlet-class>org.apache.jsp.health_jsp</servlet-class>
    </servlet>
...
</web-app>

I believe the cause is the missing backslash on the second line of the jspc.webxml.header properties in LocalStrings.properties:

jspc.webxml.header=<?xml version="1.0" encoding="{0}"?>\n\
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
\        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n\
\        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee\n\
\                http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"\n\
\        version="3.1"\n\
\        metadata-complete="false">\n\
<!--\n\
Automatically created by Apache Tomcat JspC.\n\
-->\n\
\n
Comment 1 Mark Thomas 2018-09-14 13:30:32 UTC
Thanks for the report.

Fixed in:
- trunk for 9.0.13 onwards
- 8.5.x for 8.5.35 onwards
- 7.0.x for 7.0.92 onwards
Comment 2 Chris Bonham 2018-09-14 13:32:53 UTC
Mark,

I believe the backslash is missing in the Spanish, French and Japanese versions of LocalStrings as well.

Thank you.
Comment 3 Remy Maucherat 2018-09-14 13:36:24 UTC
Correct but Mark fixed that too.