详解 问题:HttpServlet cannot be resolved to a type
程序员文章站
2024-03-03 21:57:16
httpservlet cannot be resolved to a type
descriptionresourcepathlocationtype
htt...
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
在文章 java中rest api使用示例——基于云平台+云服务打造自己的在线翻译工具 中从ibm bluemix上下载的java示例代码,导入到eclipse之后,出现以上错误信息!
错误原因:
eclipse是刚刚安装的,还没有配置服务器运行环境!
解决办法:
1、首先要安装一下tomcat;
通常是下载一个zip压缩包,解压一下就可以了;
2、eclipse中点击window菜单,选择preferences
3、在左侧展开server,选择runtime environment,右侧点击add按钮
4、在弹出的窗口中选择你的tomcat版本
5、点击“browse”按钮选择tomcat的安装位置,选择合适的jre版本,点击finish按钮完成。
通过上面的步骤,上面的错误都全部解决了,如果你的项目还显示 有错误,就需要考虑其它原因了。
可以参考:
推荐阅读
-
java eclipse 出现 xxx cannot be resolved to a type 错误解决方法
-
Cannot determine value type from string varchar问题
-
JSP报错javax.servlet.jsp.JspException cannot be resolved to a type solution
-
IOS开发遇到Interface type cannot be statically allocated 问题的解决办法
-
javax.servlet.jsp.PageContext cannot be resolved to a type
-
javax.servlet.jsp.PageContext cannot be resolved to a type
-
详解vuejs中执行npm run dev出现页面cannot GET/问题
-
MyBatis Generator报错:Cannot instantiate object of type(问题解决)
-
使用eclipse写JAVA出现xxx cannot be resolved to a type错误的解决方法详解
-
使用eclipse写JAVA出现xxx cannot be resolved to a type错误的解决方法详解