我知道maven有自帶tomcat插件,所以沒有再裝tomcat,不過new 一個項目后
index.jsp 文件報錯“The superclass "javax.servlet.ttp.HttpServlet" was not found on the java Build Path",網上說是服務器配置問題。
請問如何配置maven自帶tomcat?eclipse已裝 maven還需裝 tomcat嗎?
“粘贴好之后记得把pluginManagement这个标签注释起来,不然tomcat不会生效。”可以詳細一點嗎?對不起,剛學maven。
maven自带Tomcat,无需安装,你在pom.xml中配置下就可以了。在配置文件中找到plugins标签,把这个粘贴进去就可以了,
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/</path>
<port>8080</port>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
</plugin>
粘贴好之后记得把pluginManagement这个标签注释起来,不然tomcat不会生效。
看下 maven内置的tomcat的插件有没有安装
在什么路径下,有没有添加到path环境变量
maven里面有tomcat,但是你在运行时要原选择运行maven项目,看了下,你的图里面编译报错,下面不知道写的什么,可能是那个资源文件路径没搞