0

this is the coming while triggering the URL pattern in browser (https://i.stack.imgur.com/rt8O7.png)

I am using maven build tool and this is my servlet class.i already try to re-depoly the war file and also use web-servlet annotations.(https://i.stack.imgur.com/Q6Zxo.png)

this is web.XML file.- (https://i.stack.imgur.com/CxtN2.png)

  • https://stackoverflow.com/questions/28325329/java-lang-noclassdeffounderror-javax-servlet-http-httpservlet – Sercan Jul 03 '23 at 03:49
  • Still not working – Pranjul Khankriyal Jul 03 '23 at 03:50
  • Can you try to print classpath and make sure the `javax.servlet-api` jar file in it? It should be something like `System.out.println(System.getProperty("java.class.path"));` – Sercan Jul 03 '23 at 03:57
  • 3
    To summarise: Tomcat 10 migrates from the `javax.servlet` packages to `jakarta.servlet`. You’ll need to continue to use Tomcat 9 to deploy webapps based on the Java EE (`javax`) APIs, or migrate to Servlet API 5/Jakarta EE to use Tomcat 10. – Tim Moore Jul 03 '23 at 03:58

0 Answers0