转载记录:
方法Ⅰ:
第一步:用maven创建web项目
报错:Description Resource Path Location Type
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path index.jsp /websocket/src/main/webapp line 1 JSP Problem
报错:Cannot change version of project facet Dynamic web module to 2.5/3.0
ps-->3.0的web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Archetype Created Web Application</display-name>
</web-app>
注:其余相应由2.5写为3.0,1.6写为1.8
方法Ⅱ:用maven创建web项目