导入项目时报错:The import javax.servlet.xxxx cannot be resolved

如果eclipse已经把jar包都导入完了,那么出现这个错误的原因可能是这个项目没有绑定Tomcat。

  1. 右键项目 -> build path -> confugure build path
  2. 选择Libraries标签页,
  3. 如果有不需要的Tomcat,点击这个Tomcat,点击右边的remove按钮
    导入项目时报错:The import javax.servlet.xxxx cannot be resolved
  4. 点击右边的Add Librariy,选择Server Runtime -> next
    导入项目时报错:The import javax.servlet.xxxx cannot be resolved
  5. 选择自己需要的Tomcat服务器,点击finish。

相关文章:

  • 2021-10-06
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2021-11-14
  • 2022-12-23
猜你喜欢
  • 2021-09-25
  • 2021-11-14
  • 2021-04-11
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
相关资源
相似解决方案