Skip to content

Latest commit

 

History

History
48 lines (26 loc) · 2.9 KB

migrating-from-java-web-tomcat-8-to-java-web-tomcat-9-1c3c8d4.md

File metadata and controls

48 lines (26 loc) · 2.9 KB

Migrating from Java Web Tomcat 8 to Java Web Tomcat 9

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.

  1. 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 to org.apache.catalina.filters.RestCsrfPreventionFilter.

    Tip:

    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.

  2. Redeploy it (see Deploying and Updating Java Applications).

    Tip:

    You can use the following steps in the SAP BTP cockpit:

    1. Navigate to your application (cockpit > <your global account> > <your subaccount> > Applications > Java section).
    2. Choose the Update button for your application.
    3. In the dialog that appears, provide the application WAR file.
    4. In the runtime dropdown menu, choose the option Java Web Tomcat 9.
  3. Restart it (see Start and Stop Applications or restart console command).

    Tip:

    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 the deploy command or the rolling-update command respectively. This parameter performs the update of the runtime.

Related Information

Java Web Tomcat 8 (Deprecated)

Java Web Tomcat 9