新建Maven项目基础错误

  1. cvc-complex-type.2.3: Element 'dependency' cannot have character [children], because the type's content type is element-only.

    从网上复制的内容有一些特殊字符,依次删除报红线的地方就可以了
  2. The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

添加 <dependencies>
  <dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>servlet-api</artifactId>
  <version>2.5</version>
    </dependency>

  </dependencies>

即可解决

猜你喜欢

转载自blog.csdn.net/qq_29988051/article/details/79318540