亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

annuaire recherche
JSP 基礎教程 JSP 開發(fā)環(huán)境搭建 JSP 結構 JSP 生命周期 JSP 語法 JSP 指令 JSP 動作元素 JSP 隱式對象 JSP 客戶端請求 JSP 服務器響應 JSP HTTP 狀態(tài)碼 JSP 表單處理 JSP 過濾器 JSP Cookies 處理 JSP Session JSP 文件上傳 JSP 日期處理 JSP 頁面重定向 JSP 點擊量統(tǒng)計 JSP 自動刷新 JSP 發(fā)送郵件 JSP 高級教程 JSP 標準標簽庫(JSTL) <c:out> 標簽 <c:set> 標簽 <c:remove> 標簽 <c:catch> 標簽 <c:if> 標簽 <c:choose> <c:import> 標簽 <c:forEach> <c:param> 標簽 <c:redirect> 標簽 <fmt:formatNumber>標簽 <fmt:parseNumber> 標簽 <fmt:formatDate> 標簽 <fmt:parseDate> 標簽 <fmt:bundle> 標簽 <fmt:setLocale> 標簽 <fmt:setBundle> 標簽 <fmt:timeZone> 標簽 <fmt:setTimeZone> 標簽 <fmt:message> 標簽 <fmt:requestEncoding> 標簽 <sql:setDataSource> 標簽 <sql:query> 標簽 <sql:update> 標簽 <sql:param> 標簽 <sql:dateParam> 標簽 <sql:transaction> 標簽 <x:out> 標簽 <x:parse> 標簽 <x:set> 標簽 <x:if> 標簽 <x:forEach> 標簽 <x:choose> <x:transform> 標簽 <x:param> 標簽 fn:contains()函數 fn:containsIgnoreCase()函數 fn:endsWith()函數 fn:escapeXml()函數 fn:indexOf()函數 fn:join()函數 fn:length()函數 fn:replace()函數 fn:split()函數 fn:startsWith()函數 fn:substring()函數 fn:substringAfter()函數 fn:substringBefore()函數 fn:toLowerCase()函數 fn:toUpperCase()函數 fn:trim()函數 JSP 連接數據庫 JSP XML 數據處理 JSP JavaBean JSP 自定義標簽 JSP 表達式語言 JSP 異常處理 JSP 調試 JSP 國際化
personnages

<x:set> 標簽


<x:set>標簽為XPath表達式的值設置一個變量。

如果XPath表達式的值是boolean類型,則<x:set>將會設置一個java.lang.Boolean對象,若是字符串,則設置一個java.lang.String對象,若是數字,則設置一個java.lang.Number對象。


屬性

<x:set>標簽有如下屬性:

屬性 描述 是否必要 默認值
var 代表XPath表達式值得變量 Body
select 需要計算的XPath表達式
scope var屬性的作用域 Page

實例演示

接下來的例子告訴我們如何使用<x:set>標簽:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<html>
<head>
  <title>JSTL x:set 標簽</title>
</head>
<body>
<h3>Books Info:</h3>

<c:set var="xmltext">
  <books>
    <book>
      <name>Padam History</name>
      <author>ZARA</author>
      <price>100</price>
    </book>
    <book>
      <name>Great Mistry</name>
      <author>NUHA</author>
      <price>2000</price>
    </book>
  </books>
</c:set>

<x:parse xml="${xmltext}" var="output"/>
<x:set var="fragment" select="$output//book"/>
<b>The price of the second book</b>: 
<c:out value="${fragment}" />
</body>
</html>

運行結果如下:

BOOKS INFO:
The price of the second book:[[book: null], [book: null]]

關于我們 聯(lián)系我們 留言板

手冊網

Article précédent: Article suivant: