I was trying to mitigate the spring4shell vulnerability in one of our Spring Applications. Currently we are on Tomcat 7 and open JDK11. I am working on updating tomcat to 10.0.20 and when I try to deploy the application I see the below error.
org.apache.catalina.core.StandardContext.listenetStart Error configuring application listener of class [org.jboss.resteasy.plugins.spring.SpringContextLoaderListener] java.lang.NoClassDefFoundError: /javax/servlet/ServletContextListener
I am using Spring 4.3.5.RELEASE my question is which version of tomcat to use with open JDK 11?
Thanks in advance. pbale
Spring 5 does not work with Tomcat 10 due to package changes and renaming them from javax to jakarta in the Tomcat libraries. Neither does Spring 4. The first Spring that will work with Tomcat 10, will be Spring 6. Tomcat 8 or 9 should work just fine, try with 9 first. I know that Tomcat 8 works great with Spring 4, I used it quite often, but when 5 got out I moved to Tomcat 9.