Migrate an application running on the deprecated Java runtime Java Web Tomcat 8 to Java Web Tomcat 9.
Since 1 January 2024, we've stopped the support for Java Web Tomcat 8 runtime and stopped providing updates and security patches to it. This is following the official announcement of Apache Tomcat 8.5 end of life.
-
Generally, you don't need to change the application itself. The only exception is if you're using Cross-Site Request Forgery (CSRF) custom header protection based on
com.sap.core.js.csrf.RestCsrfPreventionFilter
. In such case, you need to switch toorg.apache.catalina.filters.RestCsrfPreventionFilter
.Check the
web.xml
file of the application to see if it uses custom header protection filter.For more information, see Using Custom Header Protection.
-
Redeploy it (see Deploying and Updating Java Applications).
You can use the following steps in the SAP BTP cockpit:
- Navigate to your application (cockpit > <your global account> > <your subaccount> > Applications > Java section).
- Choose the Update button for your application.
- In the dialog that appears, provide the application WAR file.
- In the runtime dropdown menu, choose the option Java Web Tomcat 9.
-
Restart it (see Start and Stop Applications or restart console command).
For productive applications, we recommend using Update Applications with Zero Downtime or rolling-update, both of which are performed only from command line.
In both cases, pass the optional parameter
--runtime-version 4
in thedeploy
command or therolling-update
command respectively. This parameter performs the update of the runtime.
Related Information