Jsp page return "The superclass "jakarta.servlet.http.HttpServlet" was not found" error

Viewed 3569

I was working with sample spring project , and all of the sudden the Jsp pages starts to

complain about absent of "jakarta.servlet.http.HttpServlet". Im not using any type of Jakarta

feature. My web service is Tomcat 9 and for JSP im using javax.servlet.jsp.jstl-1.2.1 and

javax.servlet.jsp.jstl-api-1.2.1. The project structure is Dynamic Web Project with these

setting :

enter image description here

and error :

enter image description here

1 Answers

http.HttpServlet mostly means you do not have a Tomcat for the project.

Right-click on the project > Properties > Project Facets > Runtimes, make sure that you checkmark the Tomcat > Apply.

If that does not work you can

Right-click on the project > Properties > Java Build Path > Add Library > Server Runtime, and select your Apache Tomcat 9

Related