问题描述
当我包含以下行时,为什么我在左侧的 Eclipse 中收到错误提示消息.
Why I get error tip message in eclipse on left when I include the following line.
<c:out value=${variable}/>
我收到错误未知标签(c:out)"
I get the error "Unknown tag(c:out)"
我也包括在上面
<%@ page isELIgnored ="false" %>
我需要包含一个 jstl 吗?
Is there a jstl I need to include?
推荐答案
您显然是在使用不支持 JSTL 的 servlet 容器进行开发,例如 Tomcat.在这种情况下,您需要下载 jstl-1.2.jar 并放入您的 webapp 的 /WEB-INF/lib 文件夹中.不需要其他更改是必要的,也不要像一些糟糕的在线教程所建议的那样提取 JAR 文件和/或在 /WEB-INF 文件夹中乱扔 TLD 文件.
You're apparently developing with a servlet container which does not support JSTL out the box, such as Tomcat. In that case, you need to download jstl-1.2.jar and drop in /WEB-INF/lib folder of your webapp. No other changes are necessary, also not extracting the JAR file and/or littering the /WEB-INF folder with loose TLD files as some poor online tutorials suggest.
将 JAR 文件放入类路径(/WEB-INF/lib 文件夹是 webapp 的运行时类路径的一部分)后,您应该能够通过将根据 它的文档:
After having dropped the JAR file in the classpath (the /WEB-INF/lib folder is part of the webapp's runtime classpath), you should be able to reference the JSTL core taglib by putting the following line in top of your JSP as per its documentation:
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
JSTL 1.2 要求 web.xml 中至少有 Servlet 2.4 声明.因此,请确保您的 web.xml 具有正确的根声明,最好是 servlet 容器支持的最高支持版本(Tomcat 7 是 Servlet 3.0,Tomcat 6 是 Servlet 2.5,Tomcat 5.5 是 Servlet 2.4).
JSTL 1.2 requires a minimum of Servlet 2.4 declaration in web.xml. So make sure that your web.xml has the proper root declaration, preferably the highest supported version as supported by your servlet container (Tomcat 7 is Servlet 3.0, Tomcat 6 is Servlet 2.5 and Tomcat 5.5 is Servlet 2.4).
- 我们的 JSTL 标签 wiki 页面(您可以通过将鼠标放在
[jstl]标签,您自己在问题上添加并单击弹出框上的 info 链接)
- Our JSTL tag wiki page (you can get to this page by putting your mouse above the
[jstl]tag which you put on the question yourself and clicking the info link on the popbox)
这篇关于<c:out/>未知标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)