The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

disable1992 picture disable1992 · Mar 31, 2014 · Viewed 736.9k times · Source

I have a project created by Maven integration in Eclipse. All work fine, but in the work space in all JSP files have this:

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

To the first string where place:

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

When I create a basic dynamic web project and JSP in - all is fine, no errors.

Answer

Ajil Mohan picture Ajil Mohan · Aug 12, 2014

Add a runtime first and select project properties. Then check the server name from the 'Runtimes' tab as shown in the image.

Select runtime from Project Facets as shown the in image