I try to build a web application using java. The software that I have used Eclipse, mysql workbench, mysql connector/J, jdk-17.0.1. The environment variable that I have set are like
After that I followed How to Connect a MySQL Database to a Tomcat Server in Eclipse video tutorial upto 12:39 min to create a html and jsp page and run the server.
HTML page:
JSP page:
The error in the JSP page is Multiple annotations found at this line: - The superclass "jakarta.servlet.http.HttpServlet" was not found on the Java Build Path
- Line breakpoint:P_reg.jsp [line: 1]
Also if I start the server as directed in the video lecture I got the error
I tried to solve this error seeing How do I import the javax.servlet / jakarta.servlet API in my Eclipse project? link.
I went through this link as well. But nothing worked.
How can I fix this problem?