日期:2014-05-18  浏览次数:20638 次

救命啊,一个jstl标签的问题,高手帮帮忙!不够分再加!
我的一个应用程序,在本地里是可以跑起来的,但是放到服务器上,就报这个错:
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
at   org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:60)
at   org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:385)
at   org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:109)
at   org.apache.jasper.compiler.TagLibraryInfoImpl. <init> (TagLibraryInfoImpl.java:116)
at   org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:312)
at   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:339)
at   org.apache.jasper.compiler.Parser.parseElements(Parser.java:749)
at   org.apache.jasper.compiler.Parser.parse(Parser.java:77)
at   org.apache.jasper.compiler.ParserController.parse(ParserController.java:159)
at   org.apache.jasper.compiler.ParserController.parse(ParserController.java:111)
at   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
at   org.apache.jasper.compiler.Compiler.compile(Compiler.java:355)


我是用TOMCAT5开发的,服务器上的TOMCAT是4.1,
web里是这样写的:
<?xml   version= "1.0 "   encoding= "UTF-8 "?>
<web-app   version= "2.4 "   xmlns= "http://java.sun.com/xml/ns/j2ee "   xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance "   xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">

     
        <jsp-config>    
        <taglib>  
          <taglib-uri> http://java.sun.com/jstl/core </taglib-uri>
          <taglib-location> /WEB-INF/c.tld </taglib-location>  
        </taglib>  
        </jsp-config>    
       
     
</web-app>

jsp页面里是这样。
<%@page   contentType= "text/html "%>
<%@page   pageEncoding= "UTF-8 "%>
<%@taglib   uri= "http://java.sun.com/jsp/jstl/core "   prefix= "c "%>  
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN "
      "http://www.w3.org/TR/html4/loose.dtd ">


为什么啊为什么??????搞了一天了!急死我了。


------解决方案--------------------
<%@taglib uri= "http://java.sun.com/jsp/jstl/core " prefix= "c "%>
<taglib-uri> http://java.sun.com/jstl/core </taglib-uri>
路径好象不一样啊

------解决方案--------------------
版本问题吧!
开发时最好要低于服务器的版本,这都是规律了。