I cant able to run Servlets and fix this error
I created a Maven web project and tried everything, but this error is not going away. However, when I created JSP files, everything worked fine. But when I tried to create a servlet and imported from Jakarta, I got a 404 Not Found error. I also tried importing from javax, but the same error occurred.
I checked the Targeted Runtime, and it's set to Apache Tomcat 10.1 with Jakarta 6.1. In Project Facets, I changed the Dynamic Web Module from 2.3 to 5.0. My JDK version is 23, but after these changes, the situation got even worse. Now, I'm getting a Catalina Lifecycle Exception and an Illegal Argument Exception.
I checked the Targeted Runtime, and it's set to Apache Tomcat 10.1 with Jakarta 6.1. In Project Facets, I changed the Dynamic Web Module from 2.3 to 5.0. My JDK version is 23, but after these changes, the situation got even worse. Now, I'm getting a Catalina Lifecycle Exception and an Illegal Argument Exception.
