December 13, 2024
Tomcat upgrade with Adobe ColdFusion (2025 release) – What has changed!
Comments
(3)
December 13, 2024
Tomcat upgrade with Adobe ColdFusion (2025 release) – What has changed!
Followers: 0 people
(3)
Adobe ColdFusion (2025 release) now uses Tomcat 10.1, upgrading from Tomcat 9, and supports servlet specifications 6.0, replacing 4.0. 
Why? 
  1. Availability of new features Tomcat 10 introduces many new features, while Tomcat 9 primarily focuses on security updates and vulnerability fixes.  
  2. Improved performance 
  3. Enhanced security 
  4. Compatibility with newer Java applications 
  5. Support for newer specifications 
    1. Servlet specification upgrade.  
      1. Tomcat 9 – Servlet 4.0 API specifications 
      2. Tomcat 10.1 – Servlet 6.0 API specifications 
What has changed? 

This namespace change is part of the transition from Java EE, managed by Oracle, to Jakarta EE under the Eclipse Foundation. 

Some functions that had been deprecated for a long time have now been removed. For example, 

  1. Response.setStatus – this method is removed due to ambiguous meaning of the message parameter. 
  2. Request.getRealPath – use ServletContext.getRealPath(). 
  3. Connector configuration in server.xml is not relaxed anymore The following configuration needs to be updated. The key credentials need to be provided in standard configuration format. 
    1. Not working example - <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" scheme="https" secure="true" SSLEnabled="true"keystoreFile="yourCertificateHere" keystorePass="certPass" clientAuth="false" sslProtocol="TLS"/> 
    2. Working config example - <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" maxThreads="150" SSLEnabled="true" scheme="https" secure="true"> <SSLHostConfig> <Certificate certificateKeystoreFile="yourCertificateHere" certificateKeystorePassword="certPass" type="RSA" /></SSLHostConfig> </Connector> 

Jars changed (packaging changed) The Java package used by the specification APIs has changed from javax. to jakarta. It will be necessary to recompile web applications against the new APIs. 

Impact on ColdFusion 2025 
  1. Updated reference from javax.servlet to jakarta.servlet package. 
  2. Update methods which were deprecated and removed. 
  3. Some jars are available with Jakarta specifications. Where upgrade was possible, was done. 
  4. Some are not available. For this, eclipse has provided with transformation utility, which would transform existing jars to Jakarta specifications. 

Note: That last step and the next section do not apply to CF applications: they are required only if there is a jar/war included by CF developers which refers to older servlet specification.

How to update your JAR/WAR/EAR codebase, if required? 

Migration is a tedious process, and Eclipse has provided a tool for the rescue.  

Eclipse Foundation has provided a utility, called Eclipse Transformer – It can be used to transform final application binary (JAR, WAR and EAR). It modifies the Java bytecode and updates the resources to refer to the current correct packages (e.g. javax.servlet to jakarata.servlet). For WAR and EAR files, it automatically transforms nested JARs.  

Eclipse Transformer can be found here on github 

Download eclipse transformer jar file  

Input file name – jakarta-ee-8-app.war

Output file name – jakarta-ee-10-app-transformed.war

java -jar transformer/org.eclipse.transformer.cli-0.5.0.jar jakarta-ee-8-app.war jakarta-ee-10-app-transformed.war

The transformed file is ready. 

To update your codebase, you will have to make following changes –  

  1. Update import packages from javax.servlet to Jakarta.servlet 
  2. Check if you are using tomcat jar functions which are not present anymore – Find the list here Deprecated List (Apache Tomcat 10.0.27 API Documentation) 
  3. Use new jars which are either 
    1. available in their repository or 
    2. Transform the existing jars 
Resources 
  1. Apache 10.1 – Apache Tomcat 10 (10.1.33) – Documentation Index 
  2. Tomcat 10 deprecated and removed features/functions – Deprecated List (Apache Tomcat 10.0.27 API Documentation) 
  3. Transform your application to JakartaEclipse Transformer | projects.eclipse.org 
  4. GitHub for eclipse transformer – GitHub – eclipse/transformer: Eclipse Transformer provides tools and runtime components that transform Java binaries, such as individual class files and complete JARs and WARs, mapping changes to Java packages, type names, and related resource names. 
3 Comments
2024-12-14 04:25:14
2024-12-14 04:25:14

Thanks for this update on changes in cf to support tomcat 10.1. That said,  we should clarify for readers that after point 3 in the “impact ” list, all the rest (about Eclipse and the Transformer) is NOT something for cf developers to be concerned with. It’s for those deploying their own WAR files on Tomcat.

Like
()
(2)
>
Charlie Arehart
's comment
2024-12-16 05:30:44
2024-12-16 05:30:44
>
Charlie Arehart
's comment

Thanks Charlie, updated the document as per your suggestion.

Like
()
>
kumaratul
's comment
2024-12-16 14:23:49
2024-12-16 14:23:49
>
kumaratul
's comment

Great to see, thanks!

Like
()
Add Comment