I'm trying to migrate an ancient struts 1 application to struts 2 and upgrade to Java 17. I think I've found all the code changes I need to make, but when I deploy I get a stack trace that starts out:
java.lang.NoClassDefFoundError: jakarta/servlet/ServletContextListener
My server is apache-tomcat-10.1.5, and per Eclipse it's using Amazon Corretto JRE 17.0.6.
My maven dependencies include the following:
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>6.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>6.1.2</version>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>3.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
I can't escape the feeling that I'm just overlooking something simple that should be obvious to me, but I thought I had all the necessary dependencies. Any thoughts?