If you are a Managed Hosting customer, this topic doesn't apply to you.
Tomcat 7 migration
In Release 9.1 SP 14, the bundled Tomcat application server has been updated to Tomcat 7 to take advantage of new improvements, such as the Web application memory leak detection and prevention. In most circumstances this change will have no impact; however, some third-party Building Blocks may require some minor changes to work with this release.
These changes relate to additional strictness in attribute parsing and reserved words in EL language, a change in tag library declaration syntax, and a recommended change to prevent regression of context startup performance.
Annotation scanning
To ensure that startup performance is not impacted by Servlet 3.0 annotation scanning, the WEB-INF/web.xml file of all building blocks must be updated to include a metadata-complete attribute.Two options are available:
- Update to a minimum version of the Servlet 2.5 specification.
- Add the attribute.
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5" metadata-complete="true">
Alternatively, update to Servlet 3.0 and include the absolute-ordering element:
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0"
metadata-complete="true">
<absolute-ordering />
To learn more about the annotation scanning changes, see http://tomcat.apache.org/migration-7.html#Annotation_scanning.
Spaces between attributes
When compiling a JSP, you may receive the error 'The JSP specification requires that an attribute name is preceded by whitespace'. Attributes previously could continue with no space, for example:
attributeOne="value1"attributeTwo="value2"
For Jasper to successfully compile, spaces need to be added in any JSP that has this problem. To learn more, see Tomcat bug 49297: https://issues.apache.org/bugzilla/show_bug.cgi?id=49297
Java reserved words in Expression Language
Expression Language tags cannot include statements that are valid Java reserved words. For example, a Bean may have a getter named getDefault(), an EL language expression would previously be able to access this with the following:
bean.default
However, this violates the reserved word strictness introduced in this release. Uses of reserved words must be updated to use the method explicitly:
bean.getDefault()
To learn more, see Tomcat bug 49217: https://issues.apache.org/bugzilla/show_bug.cgi?id=49217
Tag library declarations
Tag library declarations in WEB-INF/web.xml could previously be an immediate child of the the web-app element:
<taglib>
<taglib-uri>/tagLibUri</taglib-uri>
<taglib-location>/WEB-INF/config/taglibs/tagLib.tld</taglib-location>
</taglib>
Tomcat 7 no longer supports this configuration. Custom tag libraries declared in this way must be included in a jsp-config element:
<jsp-config>
<taglib>
<taglib-uri>/tagLibUri</taglib-uri>
<taglib-location>/WEB-INF/config/taglibs/tagLib.tld</taglib-location>
</taglib>
</jsp-config>
Learn more
To learn more about the potential breaking changes caused by the migration from Tomcat 6 to 7, see http://tomcat.apache.org/migration-7...6.0.x_to_7.0.x.