1 <!-- servlet -->
 2 <dependency>
 3   <groupId>javax.servlet</groupId>
 4   <artifactId>servlet-api</artifactId>
 5   <version>2.5</version>
 6   <scope>provided</scope>
 7 </dependency>
 8 
 9 <!-- jsp -->
10 <dependency>
11   <groupId>javax.servlet.jsp</groupId>
12   <artifactId>jsp-api</artifactId>
13   <version>2.0</version>
14   <scope>provided</scope>
15 </dependency>

依赖中已经加上了<scope>provided</scope>

本来在项目发布后是不会把这两个包发布到项目发布路径下面的,但在Eclipse下面却仍然发布了。

解决方法有两种:

  1.手动删掉两个包。

  2.右击项目-->Build Path-->Configure Build Path-->Libraries-->Add Library-->Server Runtime-->最后选择一个已配置的Tomcat,完成即可。

相关文章:

  • 2022-12-23
  • 2021-05-02
  • 2022-01-08
  • 2021-07-16
  • 2022-02-03
  • 2021-09-26
  • 2022-02-18
  • 2021-06-21
猜你喜欢
  • 2022-12-23
  • 2021-10-04
  • 2021-08-27
  • 2021-03-31
  • 2021-06-29
  • 2022-02-25
  • 2022-12-23
相关资源
相似解决方案