Reputation: 13
i have maven project with spring restful service oracle and hibernate and jpa, i am new in maven and spring development, and i got some bad error i can not find the answer and tried a lot but still got same error i am sharing me error below help:
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
web.xml
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
Upvotes: 1
Views: 10383
Reputation: 3512
you need to add javax.servlet-api
dependency into you project pom.xml
, you can find it below, you can also change the version of javax.servlet-api
:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
after Adding javax.servlet-api
you need to add runtime, goto select project properties. you can refer below image.
Upvotes: 7