The import java.util cannot be resolved The import javax.servlet cannot be resolved
The import java.util cannot be resolved
原因:这是由于你的项目buildpath不对
解决方案:右键项目-------buildpath--------最下面那个configuration 的选择libraries找到JRE(这个时候你会发现这个jre前面有!或者是红X)选中remove掉重新为该项目选择一个JRE选中项目,project----clean
java.lang.UnsupportedClassVersionError: Bad version number in .class file异常
部署工程时也出现过因为版本不同引起的问题,那时我们用的IDE的编译器是JDK5.0,而那台Linux装的是JDK6.0,部署后发现很多功能都出错,看来有些东西还是得注意一下啊。
在myEclipse中改变编译器的方法:Project->Properties->Java Compiler->Configure Workspace Setting,在弹出的页面中可以进行设置。
The import org.apache cannot be resolved
What IDE are you using? If it's eclipse, right click on the project -> Build Path -> Configure Build Path -> Libraries -> Add External Jar's
错误:
The import javax.servlet cannot be resolved
解决:
1、这是因为工程里面web-inf/lib目录下少了包:Package javax.servlet引起的;
(包的介绍可参见:http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/index.html)
2、在tomcat(本人的当前版本6.0.32)lib目录servlet-api.jar,将其copy到工程里面web-inf/lib目录下;
Unable to read TLD “META-INF/c.tld” from JAR file的
javax.servlet.jsp.PageContext cannot be resolved to a type
<%@ taglib uri="/WEB-INF/tld/jstl/c.tld" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
上网查询,解决之道是把<c:set var="ctx" value="${pageContext.request.contextPath}"/>改为<c:set var="ctx" value="${pageContext.['request'].contextPath}"/>,就不会出现这个problem,可是奇怪的是,之后再改回<c:set var="ctx" value="${pageContext.request.contextPath}"/>也没再出现这个problem。Eclipse在 JSP的语法检验看来有未尽之处。
# re: javax.servlet.jsp.PageContext cannot be resolved to a type的解决之道 2009-06-02 11:32 路人甲
你没从根本找问题.问题解决之道在于
将jsp-api.jar加入到类路径.
jsp-api.jar位于tomcat-home/common/lib下
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/fmt"
2.tld文件是否在?
3.web.xml 中 jsp-config taglib是否做了定义?
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/tlds/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
<taglib-location>/WEB-INF/tlds/fmt-rt.tld</taglib-location>
</taglib>
</jsp-config>
The import java.util cannot be resolved The import javax.servlet cannot be resolved的更多相关文章
- <<< java异常The import java.util cannot be resolved
异常:The import java.util cannot be resolved 原因:这是由于你的项目buildpath不对 解决方案:右键项目-------buildpath--------最 ...
- Eclipse: the import java.util cannot be resolved
the import java.util cannot be resolved 导入JRE System Library. 右键项目 Build Path Configure Build Path.. ...
- the import java.util.* cannot be resolve,怎么解决
我碰到这个问题是因为重装系统后,原先的JDK6换成了JDK7, Eclipse中的旧项目中jsp文件的此类import出现错误提示.在以下页面找到解决方案,专贴出来: http://www.myexc ...
- Eclipse代码报错提示: the import java.util cannot be resolve,怎么解决?
显示 the import java.util cannot be resolve,如何解决?我在使用eclipse的时候, 好像无意中更改了安装位置(workspace),现在所有的包都显示无法导入 ...
- import java.util.Scanner;
一.扫描控制台输入 当通过new Scanner(System.in)创建一个Scanner,控制台会一直等待输入,,,,,,,直到敲回车键结束,把所输入的内容传给Scanner,作为扫描对象 ...
- LinkedHashMap和HashMap的比较使用 由于现在项目中用到了LinkedHashMap,并不是太熟悉就到网上搜了一下。 ? import java.util.HashMap; impo
LinkedHashMap和HashMap的比较使用 由于现在项目中用到了LinkedHashMap,并不是太熟悉就到网上搜了一下. import java.util.HashMap; import ...
- 【转】The import javax.servlet cannot be resolved
转载地址:http://www.2cto.com/kf/201212/176868.html 今天将别人的项目导入eclipse之后,出现了“The import javax.servlet cann ...
- 解决 jsp eclipse异常 【The import javax.servlet cannot be resolved】
[ <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 报错][impor ...
- The import javax.servlet cannot be resolved
在STS中,突然把配置的Tomcat删除,换另外一个Tomcat使用时,出现:The import javax.servlet cannot be resolved.这个错误可能是服务器自带的serv ...
随机推荐
- 常用JQ特效代码
/** * hhBase 平台js * User: huanhuan * QQ: 651471385 * Email: th.wanghuan@gmail.com * 微博: huanhuan的天使 ...
- 3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...
- 收集的github的东西
1.voghDev/PdfViewPager-Android widget that can render PDF documents stored on SD card, linked as ass ...
- android-对话框
一.常用对话框 AlertDialog: 功能最丰富,实际应用最广的对话框(以下三种对话框都是该对话框的子类) ProgressDialog:进度对话框.这个对话框只是对进度条的包装 DatePick ...
- android-GridView控件的使用
GridView 按行列方式显示多个组件(二维布局界面) 数据源(集合)-适配器(SimpleAdapter)-视图界面(GridView),加载适配器-配置监听器(OnItemClickListen ...
- Linux_scp命令
一.简单概念 scp是有Security的文件copy , 基于ssh登录 二.使用 1. 发送(本地--->远程服务器) [liuwl@hadoop09-linux-02 hadoop-2. ...
- min-height
1.min-height min-height:160px;height:auto!important;height:160px; min-height:160px; 设置对象box的最小高度,Fir ...
- redis集群搭建
1. Redis Cluster的架构图. (1)所有的redis节点彼此互联(PING-PONG机制),内部使用二进制协议优化传输速度和带宽. (2)节点的fail是通过集群 ...
- 当table中的td内容过多,显示不完全,用省略号表示。
.format{ min-width:100px; max-width:200px; overflow:hidden; white-space:nowrap; text-overflow:ellips ...
- Python 基础 - 对文本的处理
Python 对文本文件的处理. 对文本操作之前,必须要先open 这个文件,open完成之后需要close . # -*- coding: utf-8 -*- f=open('test.txt',' ...