- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我尝试用 jSTL 编写代码。异常(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
我正在使用 eclipse 。我添加了 jstl.jar
和 standard.jar
. web.xml
我应该给什么现在?我不知道该在<taglib>
中给出什么.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<c:forEach var = "userName" items = "${name}">
<tr>
<td>${userName}</td>
</tr>
</c:forEach>
</body>
</html>
最佳答案
如果您下载了具有不同 URI 的古老 JSTL 1.0,或者您将 JAR 放在错误的位置(即不在 /WEB-INF/lib
或 webapp 的任何地方),就会发生这种情况运行时类路径)。
确保您下载了正确的版本并将 JAR 放入 /WEB-INF/lib
。对于 web.xml
声明为 Servlet 2.5 的 Web 应用程序,您只需下载 JSTL 1.2 as jstl-1.2.jar .对于 Servlet 2.4 web 应用程序,您需要下载 JSTL 1.1 as jstl.jar and standard.jar .
您不需要提取 JAR。您也不需要像一些糟糕的在线教程所建议的那样修改 web.xml
。只需将 JAR 放到运行时类路径中,在 JSP 中声明标签库即可。
关于java - 用于 jSTL 的 web.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4437768/
我想要一个“常量”的 JSTL 文件并在其他文件中引用它们。 例如 常量.jsp: Audi 其他文件: I drive an ${car} which is ${colour} 上面的代码(
你能帮我把这个 JSTL 标签转换成 JSTL 三元吗 class="author" class="${page.class}" > 最佳答案 非常简单: 关于jSTL -
我需要根据请求中存在的值将单选按钮设置为选中状态。下面是我在 JSP 中使用的代码 checked"> Active checked">
我有这个,它正在工作: Hello, world! 我想把它改成这样:
这个问题已经有答案了: Evaluate empty or null JSTL c tags (8 个回答) 已关闭 6 年前。 例如 ${post.title} 最佳答案 使用空关键字
我是 Java EE 技术的初学者。我想知道 jSTL-api jar 和 jSTL-impl jar 之间有什么区别。 为什么API和实现是分开的?这是否意味着还有其他可用的实现? 最佳答案 API
我正在尝试在 jetty 中运行一个在 Tomcat 5.5 中运行良好的应用程序。该应用程序使用 servlet 2.4 和 JSP 2.0。 Jetty/Jasper 抛出这个异常: org.ap
所以这是我用来发送包含值 ${masession.idemp} 的参数“idemp”的代码 "> " alt="consulter tickets
这个问题在这里已经有了答案: How to install JSTL? The absolute uri: http://java.sun.com/jstl/core cannot be resol
我正在学习 Spring-MVC 教程,目前我在 part 2 上.本教程要求我下载 jSTL.jar 和 standard.jar,它们曾经是 Jakarta Taglibs 项目的一部分。该项目已
我正在尝试以这种特定格式格式化数字: “1 234.56” 所以,两个小数,用点分隔。并使用空格字符(可选单引号)将数千个分组。输入值永远不会大于 9999.99。 我尝试为此使用模式,甚至尝试使用语
我正在使用 fmt:formatNumber 在 JSTL 中格式化货币,它会以 ($100) 格式显示负货币,如何让它以负数格式显示负货币而不是 ($100)? 非常感谢, 起诉 最佳答案 如果您使
我不知道我做错了什么,但我不能包括 JSTL。我有 jSTL-1.2.jar,但不幸的是我得到了异常: org.apache.jasper.JasperException: The absolute
我只需要这样的东西: ..... function myFunc(param) { if(param == true) { return "aaa"
当我使用 JSTL c:forEach 标签时,我的项目出现以下错误。我正在使用 apache Tomcat v7.0。 我在 WEB-INF\lib 文件夹中添加了以下 jar。 taglibs-s
以下代码导致错误: 错误提示 "error a line 4: unknown symbol 'test'". 如何将 test 从 JSTL 代码传递到 JSP scriptlet? 最
我正在使用 JSF 2.0 (mojarra) + primefaces 开发 Web 应用程序。过去我成功地使用了jSTL库的[c:set]标签来存储一些临时数据或从其他标签中输出。 在我目前的情况
我的实际目标是得到 工作。我目前正在使用 jetty-runner 7.4.2 运行我的 Web 应用程序。作为一个随机的尝试,我下载了一个更新的版本。这样,当我尝试启动我的 Web 应用程序时,我
为了尝试使用 jSTL,我用 maven 安装了 jSTL 1.2 库。但是,当我通过此消息运行 jsp 页面时,“绝对 uri: [ http://java.sun.com/jsp/jstl/cor
当我混合 JSTL 1.0 和 JSTL 1.1 taglib 声明时,它会在我的一些服务器上导致 ParseException,但不是全部。 这是给我带来麻烦的代码块: |STRINGOFTEX
我是一名优秀的程序员,十分优秀!