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

-> jsp가 servlet으로 변환될때 servlet-api.jar 파일이 필요한데 없을때 발생하는 에러

 

해결방법

1) 해당 프로젝트 우클릭 Build Path > Configure Build Path > Libraries > Classpath > Add External JARs...

>Tomcat 8.5\lib > servlet-api.jar 불러오기

 

 

2)pom.xml에서 servlet-api.jar 다운로드

<!--pom.xml-->
<dependencies>
<!-- servlet-api-3.1.0.jar 다운로드 -->
  	<dependency>
  		<groupId>javax.servlet</groupId>
  		<artifactId>javax.servlet-api</artifactId>
  		<version>3.1.0</version>
  		<scope>provided</scope>
  	</dependency>
</dependencies>

 

 

+ Recent posts