`
angelbill3
  • 浏览: 252371 次
  • 性别: Icon_minigender_2
  • 来自: 杭州
社区版块
存档分类
最新评论

【问题】 http://java.sun.com/jsp/jstl/core cannot be resolved

 
阅读更多
错误: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/




分享到:
评论

相关推荐

    【SSS】taglibs&&jstl;

    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 发生jar包错误

    JSTL 标签 发生 uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application问题时解决方法

    jstl标签在jsp中使用问题

    在web项目中使用JSTL标签,JSTL 1.0 的声明是 &lt;%@ taglib prefix="c" uri="http://java.sun.com/jstl/core " %&gt; ...以解决http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml错误

    JSTL包和standrad包

    在web项目中使用JSTL标签,JSTL 1.0 的声明是 &lt;%@ taglib prefix="c" uri="http://java.sun.com/jstl/core " %&gt; ...以解决http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml错误

    使用JSTL所需要的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.jar,standard.jar

    **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包

    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就可以解决。

    jstl-1.2.jarJAR包.rar

    这个是一个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包。

    JSTL必要包(jstl.jar和standard.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 ...

    下载jstl.jar和standard.jar

    关于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包导入工程后,运行页面依然...

Global site tag (gtag.js) - Google Analytics