• Register
Welcome to Kodlogs, programming questions and answer website.
+1 vote


I am having following issue I am always getting this error:

the superclass "javax.servlet.http.httpservlet" was not found on the java build path.

I am getting this error on JSP page while using maven integration with eclipse.

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

by (300 points)  
reopened by

1 Answer

+1 vote

Possible Cause:

The reason of this error may be because you are missing dependency of javax.servlet-api  into you project pom.xml


Method1: UseTarget Runtime

In this method add server runtime to your application like for facet.

Properties > Select Project Facets >  SelectRuntimes > Choose Server name > Click Apply > Click OK

Method 2: Maven Dependency

In this method you can include the servlet dependency via maven. 






Method 3: Use Runtime and add to the classpath

Java Build Path > Libraries > Add Library > Server Runtime > Next 

then select a Runtime(Apache Tomcat Server) > Finish > OK 


The above methods will sort out issue with superclass "javax.servlet.http.httpservlet" was not found on the java build path

Further Reading Suggested/ See more Links/ Userful Resource:




by (1.4k points)