[img]http://dl2.iteye.com/upload/attachment/0116/1631/717cc6cb-ca5c-3d48-b5a2-412065aebcbd.png[/img]
maven 建立一个web-app后. 选择JDK1.7. 不能选择Dynamic Web Module3.0的修改办法.
第一步: 先选择JDK1.7
第二步: 修改pom.xml 添加:
[img]http://dl2.iteye.com/upload/attachment/0116/1633/c535a93e-69aa-351c-a52d-244e036755a3.png[/img]
第三步: 修改/WEB-INF/web.xml 替换整个头文件
[img]http://dl2.iteye.com/upload/attachment/0116/1635/0924fe34-041f-318a-9877-c8dbebff07c9.png[/img]
第四步: 修改项目目录下的\ssbm\.settings\org.eclipse.wst.common.project.facet.core.xml 文件.
2.3 改成3.0
[img]http://dl2.iteye.com/upload/attachment/0116/1637/604450cd-1b4e-33e6-a177-e169859316ae.png[/img]
完成
[img]http://dl2.iteye.com/upload/attachment/0116/1639/957b23db-6654-37cd-afc4-994ff342f33c.png[/img]
maven 建立一个web-app后. 选择JDK1.7. 不能选择Dynamic Web Module3.0的修改办法.
第一步: 先选择JDK1.7
第二步: 修改pom.xml 添加:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
[img]http://dl2.iteye.com/upload/attachment/0116/1633/c535a93e-69aa-351c-a52d-244e036755a3.png[/img]
第三步: 修改/WEB-INF/web.xml 替换整个头文件
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Archetype Created Web Application</display-name>
</web-app>
[img]http://dl2.iteye.com/upload/attachment/0116/1635/0924fe34-041f-318a-9877-c8dbebff07c9.png[/img]
第四步: 修改项目目录下的\ssbm\.settings\org.eclipse.wst.common.project.facet.core.xml 文件.
2.3 改成3.0
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
</faceted-project>
[img]http://dl2.iteye.com/upload/attachment/0116/1637/604450cd-1b4e-33e6-a177-e169859316ae.png[/img]
完成
[img]http://dl2.iteye.com/upload/attachment/0116/1639/957b23db-6654-37cd-afc4-994ff342f33c.png[/img]