1、Maven Project
File -> New -> Maven Project
2、Next
3、quickstart -> Next
4、Artifact Id -> Finish
5、创建项目成功
6、Properties
项目右键 -> Properties
7、添加tomcat
1)Java Build Path -> Libraries -> Add Library
2)Server Runtime -> Next
3)Tomcat -> Finish
4)添加后效果
8、Project Facets -> Convert to faceted form
9、Further configuration available
10、OK
11、编辑web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
网友评论