温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

HttpServlet cannot be resolved to a type是什么意思

发布时间:2020-11-12 15:30:11 来源:亿速云 阅读:548 作者:Leah 栏目:编程语言

这篇文章给大家介绍HttpServlet cannot be resolved to a type是什么意思,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

HttpServlet cannot be resolved to a type

DescriptionResourcePathLocationType
HttpServlet cannot be resolved to a typeSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 15Java Problem
HttpServletRequest cannot be resolved to a typeSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 22Java Problem
HttpServletResponse cannot be resolved to a typeSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 22Java Problem
ServletException cannot be resolved to a typeSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 22Java Problem
The import javax.servlet cannot be resolvedSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 5Java Problem
The import javax.servlet cannot be resolvedSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 6Java Problem
The import javax.servlet cannot be resolvedSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 7Java Problem
The import javax.servlet cannot be resolvedSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 8Java Problem
The import javax.servlet cannot be resolvedSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 9Java Problem


WebServlet cannot be resolved to a typeSimpleServlet.java/JavaHelloWorldApp/src/main/java/wasdev/sample/servletline 14Java Problem

HttpServlet cannot be resolved to a type是什么意思

在文章 Java中REST API使用示例——基于云平台+云服务打造自己的在线翻译工具 中从IBM Bluemix上下载的Java示例代码,导入到Eclipse之后,出现以上错误信息!

错误原因:

Eclipse是刚刚安装的,还没有配置服务器运行环境!

解决办法:

1、首先要安装一下Tomcat;

通常是下载一个zip压缩包,解压一下就可以了;

2、Eclipse中点击Window菜单,选择Preferences

HttpServlet cannot be resolved to a type是什么意思

3、在左侧展开Server,选择Runtime Environment,右侧点击Add按钮

HttpServlet cannot be resolved to a type是什么意思

4、在弹出的窗口中选择你的Tomcat版本

HttpServlet cannot be resolved to a type是什么意思

5、点击“Browse”按钮选择Tomcat的安装位置,选择合适的JRE版本,点击Finish按钮完成。

HttpServlet cannot be resolved to a type是什么意思

通过上面的步骤,上面的错误都全部解决了,如果你的项目还显示 有错误,就需要考虑其它原因了。

关于HttpServlet cannot be resolved to a type是什么意思就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI