JSTL 核心标签库 (01) : 概览

核心标签库是最常用的JSTL库.
  1. 安装:
    • 标准语法: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    • XML语法: <anyxmlelement xmlns:c="http://java.sun.com/jsp/jstl/core"/>
  2. 标签概览:
    catch Catches any Throwable that occurs in its body and optionally exposes it.
    choose Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by <when> and <otherwise>
    if Simple conditional tag, which evalutes its body if the supplied condition is true and optionally exposes a Boolean scripting variable representing the evaluation of this condition
    import Retrieves an absolute or relative URL and exposes its contents to either the page, a String in 'var', or a Reader in 'varReader'.
    forEach The basic iteration tag, accepting many different collection types and supporting subsetting and other functionality
    forTokens Iterates over tokens, separated by the supplied delimeters
    out Like <%= ... >, but for expressions.
    otherwise Subtag of <choose> that follows <when> tags and runs only if all of the prior conditions evaluated to 'false'
    param Adds a parameter to a containing 'import' tag's URL.
    redirect Redirects to a new URL.
    remove Removes a scoped variable (from a particular scope, if specified).
    set Sets the result of an expression evaluation in a 'scope'
    url Creates a URL with optional query parameters.
    when Subtag of <choose> that includes its body if its condition evalutes to 'true'

参考:
http://www.cnblogs.com/lihuiyy/archive/2012/02/24/2366806.html
http://docs.oracle.com/javaee/5/tutorial/doc/bnakc.html
http://docs.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/
http://www.oracle.com/technetwork/java/index-jsp-135995.html

转载于:https://my.oschina.net/CasparLi/blog/472046

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值