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.
Add the server runtime libraries In the window that appears, choose Java Build path on the left. Then choose the Libraries tab in the view that appears. Click the Add Runtime option and then select Server Runtime. Add the server runtime to the web project to fix the HttpServlet not found Eclipse error.
An abstract class that simplifies writing HTTP servlets. It extends the GenericServlet base class and provides an framework for handling the HTTP protocol. Because it is an abstract class, servlet writers must subclass it and override at least one method.
Add a runtime first and select project properties. Then check the server name from the 'Runtimes' tab as shown in the image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With