日期:2014-05-16  浏览次数:20308 次

tomcat JSTL出错
这个时候我不想使用rsp中自己带的那个tomcat,我想自己已经有的tomcat。就在这个时候我遇到问题了。什么问题呢,我们来看看启动时的log

严重: Servlet.service() for servlet jsp threw exception

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

    很明显是没有找到uri为http://java.sun.com/jsp/jstl/core 的tld文件。不对啊,这个应该都是在web应用程序里面的啊。但是他自己带的tomcat就可以。肯定是他自己加了。我找了好大一会儿终于在C:\rsp\apache-tomcat-5.5.15\common\lib多出两个包他们分别是jstl.jar和standard.jar。查看了一下standard.jar所有真相大白。他包含了一个c.tld的文件。其中有这么一段

<description>JSTL 1.1 core library</description>

<display-name>JSTL core</display-name>

<tlib-version>1.1</tlib-version>

<short-name>c</short-name>

<uri>http://java.sun.com/jsp/jstl/core</uri>

好了,把这两个包放入到我自己的tomcat中,所有问题都解决了。终于顺畅的跑起来了。