在eclipse中导入其他项目可能会出现import javax.servlet.http.*;报错,解决方案如下:
2016-12-04 17:40
357 查看
问题描述:有时在导入别人运行过的项目到eclipse中时如果项目的程序中import了javax.servlet.http.*包,可能会报错,在src包上和相应的js文件上会出现小红叉号,
原因:出错的原因是,导入别人的项目后,别人的电脑上他配置了Server,一般都是tomcat,而在拷贝的过程中Server的那些library是不会随项目一起拷贝过来的,除非别人把tomcat的library一起拷贝到WEB-INF\lib下。
解决方案:只要导入自己tomcat的library即可。
步骤:选中出错项目右键----->Properties----->JavaBuildPath----->AddLibrary----->ServiceRunTime点击next,然后选择你的server----->Apply----->Finish。
原因:出错的原因是,导入别人的项目后,别人的电脑上他配置了Server,一般都是tomcat,而在拷贝的过程中Server的那些library是不会随项目一起拷贝过来的,除非别人把tomcat的library一起拷贝到WEB-INF\lib下。
解决方案:只要导入自己tomcat的library即可。
步骤:选中出错项目右键----->Properties----->JavaBuildPath----->AddLibrary----->ServiceRunTime点击next,然后选择你的server----->Apply----->Finish。
相关文章推荐
- 在eclipse中导入其他项目可能会出现import javax.servlet.http.*;报错,解决方案如下:
- 今天下午导入maven项目后,编译前出现如下javax.servlet.http.HttpServletRequest
- 用eclipse开发的jsp项目当导入import javax.servlet.http.HttpServletRequest; 时候老提醒错误
- Eclipse导入JavaWeb项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- Eclipse进行Java web开发时,可能会出现这样的错误:The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path
- eclipse 无法导入 import javax.servlet.http.HttpServlet
- 问题:Eclipse新建web项目出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build P
- MyEclipse导入项目时 提示 The import javax.servlet.http cannot be resolved
- 关于导入web项目出现"javax.servlet.http.HttpServlet" was not found on the Java Build Path异常
- 项目导入时报错:The import javax.servlet.http.HttpServletRequest cannot be resolved
- Eclipse新建Web项目出现The superclass "javax.servlet.http.HttpServlet" was not found...
- 关于myeclipse项目导入到eclipse 标签库以及The superclass "javax.servlet.http.HttpServlet" was not found没有发现
- 用myeclipse开发的javaweb项目当导入import javax.servlet.http.HttpServletRequest; 时候老提醒错误
- Eclipse新建Web项目出现The superclass "javax.servlet.http.HttpServlet" was not found...
- 导入项目之后提示 The import javax.servlet.http.HttpServletRequest cannot be resolved 之后JSP页面page指令报错 java项目导
- eclipse导入别人的项目时报错“The import javax.servlet cannot be resolved”
- Eclipse新建Web项目出现The superclass "javax.servlet.http.HttpServlet" was not found...
- 项目导入时报错:The import javax.servlet.http.HttpServletRequest cannot be resolved
- 在Myeclipse buildpath 加server lib (server runtime)/项目导入时报错:The import javax.servlet.http.HttpServletRequest cannot be resolved
- eclipse 无法导入 import javax.servlet.http.HttpServlet