【发布时间】:2013-07-25 01:54:38
【问题描述】:
我是 jsp 页面的新手,就在昨天我开了一个类似的讨论。 这可能是重复的或非常相似的,我很抱歉是否是这种情况,但是我正在开发 jsp 页面只有几天,我还不明白环境、文件夹等是如何的“链接在一起。
我在 Apache Tomcat 7 上遇到以下错误
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
因为我包含了这个taglib
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
然后,我在“WEB-INF”文件夹中创建了一个文件夹“lib”,并将文件 jstl-1-2.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 删除 standard.jar 但我从来没有类似的文件。
在网上读书和冲浪,我在Tomcat 7中读到应该足以将jstl-1-2.jar放入WEB-INF/lib文件夹如下所示,但无论有无该文件,都没有任何反应。错误没有改变。
/var/lib/tomcat7/webapps/jsp_test/web/WEB-INF/lib/jstl-1-2.jar
这是文件夹三:
- webapps - ROOT - index.html
- META-INF - context.xml
- jsp_test - nbproject
- src - conf - MANIFEST.MF
- java - mypack - Display.java
- web - ROOT - index.jsp
- WEB-INF - lib -jstl-1.2.jar
- web.xml
- beans.xml
我还注意到,tomcat 7 文件夹中还有另一个 web.xml 文件:
/etc/tomcat7/web.xml
我是否必须更改两个 web.xml 文件中的某些内容?
此外,查看 tomcat7-example 文件夹中有一个 web.xml 文件,其中许多库都以 .tld 扩展名编写:
/usr/share/tomcat7-examples/examples/WEB-INF/web.xml
我为这个愚蠢的事情迷路了,请帮助我! :)
【问题讨论】:
标签: java jsp tomcat jstl jsp-tags