`

JSTL版本错误的解决-"This absolute uri (http://java.sun.co

 
阅读更多

今天将JSP的项目从Tomcat 5.5.12移植到Jboss AS去,偶然发现了一个奇怪的问题。"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 "

    由于JSTL1.0和JSTL1.1的声明语句不一样。

JSTL 1.0 的声明是:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core " %>

JSTL1.1 的声明是:
<%@ taglib prefix="c" uri=http://java.sun.com/jsp/jstl/core %>

如果你使用的JSTL库和你在JSP中的声明不一致。就会报上面提到的Exception。

另外,要注意的是:Tomcat是先引用"TOMCAT_HOME/shared/lib"下面的库,再引用web项目下面的"WEB-INF/lib'的库。

还有就是,jBuilder自带库中的JSTL有两个配置,一个是"JSTL"(1.0),一个是"JSTL1.1"(1.1),注意在做项目的时候别引用错了。

还有一个技巧是:如何判断JSTL的两个库文件(standar.jar和jstl.jar)的版本?展开jar文件在"META-INF"目录下的MANIFEST.MF文件,其中"Specification-Version"指名的就是版本号。

分享到:
评论

相关推荐

    【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

    关于jsp页面使用jstl的异常分析

    @ taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core” %&gt; 2.如果jsp页面报如下异常 org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.Customer.addCustomerInfo_...

    使用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下没有,这是工具发布项目的问题,...

    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用到的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...

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

    ssh框架错误总结

    将导致org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application错误。 解决方法:添加JSTL...

    tyrantshop.zip

    &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt; &lt;c:set var = "path" value = "${pageContext.request.contextPath }"&gt;&lt;/c:set&gt; &lt;!DOCTYPE ...

Global site tag (gtag.js) - Google Analytics