关于JSP中org.apache.jasper.JasperException:
This absolute uri
http://java.sun.com/jsp/jstl/core
) cannot be resolved in either web.xml or the jar files deployed with this application
照着《精通JSP--Web开发技术与典型应用》敲了一段JSTL的代码。没想到报错了。为这个问题搞了一下午,坐得屁股疼……
我的开发环境是Eclipse 3.2.0、Myeclipse 5.0、Tomcat 5.0.28(它用的是JRE1.4)和JDK1.5
从网上搜了一下,相同的说法是:一个就是JSTL的版本问题(1.0与1.1),是否不一致。
还有就是检查虚拟目录下WEB-INF目录下的lib文件夹(如果同有lib文件夹,后动创建一个)中是否有jstl.jar和standard.jar两个jar包
,如果没有则把它们复制到lib下面。
都试了,不过报错依旧……后来又找了一下加上自己的乱搞,按照上面的改过之后,大体有两种解决方法:
第一种就是在Eclipse的工程中导入JSTL1.1后,下载JSTL1.1 http://jakarta.apache.org/taglibs/index.html
然后解压,把*.jar和*.tld放到/WEB-INF/lib目录下。也就是将
所有的jakarta-taglibs-standard-current.zip(JSTL的类库)中的.jar和.tlb放到WEB-INF目录下的
lib文件夹中,JSP文件中导入<%@ taglib prefix="c" uri="/WEB-INF/lib/c.tld" %>,
经试验是可以的。
第二种是修改web.xml,加上下面的语句:
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/xml</taglib-uri>
<taglib-location>/WEB-INF/x.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/sql</taglib-uri>
<taglib-location>/WEB-INF/sql.tld</taglib-location>
</taglib>
</jsp-config>
JSP中导入<%@ taglib prefix="c" uri="
http://java.sun.com/jsp/jstl/core
" %>。
应该就可以了……
推荐第二种^_^!
转摘者注:我采用第一种解决问题也很方便
分享到:
相关推荐
无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://java.sun.com/jsp/jstl/core],解决办法:WEB/INF的lib下,除了导入jstl.jar包,还要导入standard.jar包。另外,解压standard.jar包,把.tld文件...
有的时候在开发jsp时,需要使用jstl时,在jsp上面引用jstl却出现错误:Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core,这是由于缺少两个jar包导致的。
MyEclipse 出错提示 Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core
HTTP Status 500 - The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
JSTL 标签 发生 uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application问题时解决方法
针对Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core”问题
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> XML LIBRARY <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> FMT LIBRARY <%@ taglib prefix="fmt" uri="...
在web项目中使用JSTL标签,JSTL 1.0 的声明是 <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core " %> ...以解决http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml错误
关于jsp中报错:cannot find the tag library descriptor for http://java.sun.com/jsp/jstl/core-附件资源
Core http://java.sun.com/jstl/core c <c:tagname ...> XML processing http://java.sun.com/jstl/xml x <x:tagname ...> I18N capable formatting http://java.sun.com/jstl/fmt fmt <fmt:tagname ...> ...
在web项目中使用JSTL标签,JSTL 1.0 的声明是 <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core " %> ...以解决http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml错误
核心标签库:http://java.sun.com/jsp/jstl/core 包含 Web 应用的常见工作,比如:循环、表达式赋值、基本输入输出等。 格式化标签库:http://java.sun.com/jsp/jstl/fmt 用来格式化显示数据的工作,比如:对...
@ taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core” %> 2.如果jsp页面报如下异常 org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.Customer.addCustomerInfo_...
导入时需要将两个都导入,jstl-1.2.jar是高版本的,是将低版本的两个文件合成一个了,故只需要导入一个文件即可,导入的同时在jsp文件首行写入 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> ...
在使用IDEA开发maven+springMVC...@ taglib uri=http://java.sun.com/jsp/jstl/core prefix=c %> <%@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt %> <html> <head> <title>
**The absolute uri:http://java.sun.com/jsp/jstl/core(也可能是http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed** 可能二:项目目录下WEB-INF/lib下没有jstl.jar...
这个是一个jar包,适用于...The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files deployed with this application,遇到这种报错信息,多半是缺少jar包。
The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or t 最终查到问题是 jstl.jar 包在ide项目中有,但在tomcat发布的应用WEB-INF/lib下没有,这是工具发布项目的问题,...
JSTL 以及自定义标签开发相关 JSTL 核心标签库标签共有13个,功能上分为4类: 1.表达式控制标签:out、set、remove、catch ...<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>