在STS中,突然把配置的Tomcat删除,换另外一个Tomcat使用时,出现:The import javax.servlet cannot be resolved。这个错误可能是服务器自带的servlet库未导入的原因。右键项目属性,转到Targeted Runtimes,选择一个服务器,例如Tomcat,单击应用,可能就可以解决。如图所示
相关文章
- 【报错】 from pip._internal. import get_installed_distributionsImportError: cannot import n
- cannot be resolved. It is indirectly referenced from required .class files
- 成功解决ImportError: cannot import name ‘xxx‘ from partially initialized module xxx
- 导入javax.servlet。伺服登记无法解决:The import javax.servlet.MultipartConfigElement cannot be resolved
- An import path cannot end with a ‘.ts’ extension. Consider importing ‘@/*.js’ instead.
- springboot如何访问resource目录下的文件,访问不到资源处理方法:class path resource [] cannot be resolved to UR
- 引入旧的Java项目的时候出现"Description Resource Path Location Type Date cannot be resolved to "解决方案
- 成功解决python3装库时ImportError: cannot import name ‘Feature‘ from ‘setuptools‘报错
- ImportError: cannot import name ‘XXX‘ 问题解决方案
- 解决ImportError: cannot import name ‘imread‘ from ‘‘