错误:
org.apache.jasper.JasperException: /WEB-INF/views/index/index.jsp(6,0) 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
框架:springMVC 3.2.3
tomcat:6.X
---------------------------
看错误,index.jsp第6行:<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core " %>
标签库有问题啊。。。
但是奇怪的是,我在7.X下运行,完全没有任何问题。
后来去网上查了下,说jstl标签需要两个包:jstl.jar和standard.jar。
一看项目的lib,只有jstl.jar包,而standard.jar包却没有。。
所以在项目中加上standard.jar,问题解决。
(至于7.X下为什么可以就不清楚了,看了下tomcat的lib下,也没有这个包。)
--------------------------
查看了下tomcat 6.X的servlet版本,是2.5,jstl.jar版本是1.1,网上前辈说jstl.jar1.2以上可以不用standard.jar。
tomcat 7.X的servlet版本是3.0,不知道3.0版本是否对jstl进行扩展以便更好的支持标签库的原因,才导致7.X下不需要standard.jar。
具体的servlet,jsp,jstl的版本配置如下图:
---------------------------
如何查看版本:将jar文件右键,用360压缩,或是WinRar打开,里面有个META-INF文件夹,打开它,找到MANIFEST.MF.
如下:
Manifest-Version: 1.0
Specification-Title: JavaServer Pages Standard Tag Library (JSTL)
Created-By: 1.4.2-38 ("Apple Computer, Inc.")
Ant-Version: Apache Ant 1.6.1
Implementation-Title: JavaServer Pages Standard Tag Library API Refere
nce Implementation
Specification-Version: 1.1
Implementation-Vendor-Id: com.sun
Extension-Name: javax.servlet.jsp.jstl
Implementation-Version: 1.1.2
Implementation-Vendor: Sun Microsystems, Inc.
就能找到相应的版本号了。
---------------------------
参考网址:
How to Reference and Use JSTL in your Web Application
http://www.mularien.com/blog/2008/04/24/how-to-reference-and-use-jstl-in-your-web-application/
分享到:
相关推荐
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问题时解决方法
@ 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_...
在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错误
在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错误
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下没有,这是工具发布项目的问题,...
当出现类似 `org.apache.jasper.JasperException: 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` 的异常时,这通常...
**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...
jetty的main启动代码及相关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 导入jsp-api.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包。
解决struts2中报错:“HTTP Status 500 - org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this ...
关于The absolute uri: http://java.sun.com/jstl/core_rt cannot be resolved in either web.xml or the jar files deployed with this application解决! 将jstl.jar和standard.jar包导入工程后,运行页面依然...
当遇到类似`org.apache.jasper.JasperException: 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`这样的异常时,...
当你在JSP页面中使用JSTL标签,如`<c:out>`,但出现"The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved"错误时,这通常是因为缺少JSTL库。你需要确保在项目的类路径下包含了JSTL的jar文件,...
在尝试访问`WEB-INF/jsp`页面时,可能会遇到如下的错误提示:“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”。...