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,完成即可。