1. Create a maven project, and use the webapp framework, and modify pom.xml file
<build>
<finalName>myWebApp</finalName>
<!-- 配置tomcat插件,web端 -->
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<path>/app</path>
<port>8080</port>
</configuration>
</plugin>
</plugins>
</build>
2. Add maven configuration
3. Use the debug start the project, be sure to use debug way to start
4. Access Resources