. Advertisement .
..3..
. Advertisement .
..4..
How to check – the superclass “javax.servlet.http.httpservlet” was not found on the java build path? I have the sample detail:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
While I run it, I found the warning message:
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
That is my question in my midterm exam, and it is urgent. I searched for the key on some websites, but I didn’t get it. I may miss any line or other changes. I appreciate your assistance!
The cause: This error can happen because your program lacks of runtimes or http-servlet is not available.
Solution: You can resolve this error by adding a runtime and choose project properties. Then from the ‘Runtimes’ tab let’s check the server name as the image shown below:
To fix error “The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path”, you need to choose “Apache Tomcat”.
Here are the steps you need to follow
Project properties → Java Build Path → Add Library → Choose “Server Runtime” → Next → Choose “Apache Tomcat” → Finish.