1.maven启动tomcat后会在src-main-webapp中查找对应在web.xml中配置的默认主页,所以在web.xml中配置了默认的主页以后,一定要使文件在webapp目录中。
2.关于pom中配置tomcat插件后的书写
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<configuration>
<port>80</port>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
artifactId:tomcat的版本
port:tomcat的端口
path:项目被访问的路径,/即是默认访问,直接localhost访问主页。
3.在maven中使用版本管理器时一定要注意,要用<properties>标签将版本进行包裹后,后续的版本才能被识别