jstl-api jstl_JSTL教程,JSTL标签示例

JSTL是JSP标准标签库,提供控制JSP页面行为的标签,如迭代、控制语句、国际化和SQL操作。在本文中,我们将探讨JSTL的核心标签,包括其在迭代、条件逻辑、异常处理等方面的应用,并通过一个简单的Web应用程序展示如何使用JSTL与Java Bean、Servlet和JSP页面配合工作。
摘要由CSDN通过智能技术生成

jstl-api jstl

JSTL stands for JSP Standard Tag Library. JSTL is the standard tag library that provides tags to control the JSP page behavior. JSTL tags can be used for iteration and control statements, internationalization, SQL etc. We will look into JSTL Tags in detail in this JSTL tutorial.

JSTL代表JSP标准标记库 。 JSTL是标准的标记库,它提供用于控制JSP页面行为的标记。 JSTL标签可用于迭代和控制语句,国际化,SQL等。我们将在此JSTL教程中详细研究JSTL标签。

Earlier we saw how we can use JSP EL and JSP Action Tags to write JSP code like HTML but their functionality is very limited. For example, we can’t loop through a collection using EL or action elements and we can’t escape HTML tags to show them like text in client side. This is where JSTL tags comes handy because we can do much more from JSTL tags.

前面我们看到了如何使用JSP ELJSP动作标签来编写HTML之类的JSP代码,但是它们的功能非常有限。 例如,我们不能使用EL或action元素遍历一个集合,也不能逃脱HTML标签以在客户端将其显示为文本。 这是JSTL标签派上用场的地方,因为我们可以从JSTL标签做更多的事情。

JSTL (JSTL)

JSTL is part of the Java EE API and included in most servlet containers. But to use JSTL in our JSP pages, we need to download the JSTL jars for your servlet container. Most of the times, you can find them in the example projects of server download and you can use them. You need to include these libraries in your web application project WEB-INF/lib directory.

JSTL是Java EE API的一部分,并包含在大多数Servlet容器中。 但是要在我们的JSP页面中使用JSTL,我们需要为您的servlet容器下载JSTL jar。 大多数时候,您可以在服务器下载的示例项目中找到它们,并可以使用它们。 您需要将这些库包含在Web应用程序项目WEB-INF / lib目录中。

JSTL罐子 (JSTL jars)

JSTL jars are container specific, for example in Tomcat, we need to include jstl.jar and standard.jar jar files in project build path. If they are not present in the container lib directory, you should include them into your application. If you have maven project, below dependencies should be added in pom.xml file or else you will get following error in JSP pages – eclipse Can not find the tag library descriptor for "https://java.sun.com/jsp/jstl/ core"

JSTL jar是特定于容器的,例如在Tomcat中,我们需要在项目构建路径中包括jstl.jarstandard.jar jar文件。 如果它们在容器lib目录中不存在,则应将它们包含在应用程序中。 如果您有Maven项目,则应在pom.xml文件中添加以下依赖项,否则您将在JSP页面中收到以下错误-eclipse eclipse Can not find the tag library descriptor for "https://java.sun.com/jsp/jstl/ core"

<dependency&
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值