package javax.servlet.http does not exist
Closed this issue · 0 comments
zhonghuasheng commented
jdk本身不带servlet.jar包,需要加载到环境变量中去,否则造成编译过不了.
Maven项目中直接添加dependency
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
或者在classpath中追加*/tomcat8/lib/servlet-api.jar(tomcat8)