国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

標簽庫使用指南1-Application標簽庫

2019-11-18 15:12:15
字體:
來源:轉載
供稿:網友

  1. application Tag Library
APPLICATION標簽庫中包含的標簽用來訪問jsp應用中的所有ApplicationContext信息。

1.1 使用指南:
(1) 將標簽庫描述文件application.tld拷貝到/WEB-INF目錄下;
(2) 將標簽庫JAR文件拷貝到/WEB-INF/lib目錄下;
(3) 在/WEB-INF/web.xml文件中加入配置信息:

http://jakarta.apache.org/taglibs/application-1.0
/WEB-INF/application.tld

(4) 在使用標記庫的JSP文件中加入引用信息:
<%@ taglib uri="http://jakarta.apache.org/taglibs/application-1.0" prefix="app" %>

1.2 標簽說明
1.2.1 Application屬性標簽

標簽名 attribute
Tag Body empty
作用 得到application中某個屬性的值
使用示例
示例說明 輸出application中名為test1的屬性的值。

標簽名 attributes
Tag Body JSP
作用 遍歷application中所有的屬性或得到特定屬性的值
使用示例 Name: Value:
示例說明 輸出application中所有屬性的名稱和值。
使用示例 Name: Value:
示例說明 輸出application中屬性myatt的名稱和值。

標簽名 equalsAttribute
Tag Body JSP
作用 判定application中屬性的值是否與指定值相等。
使用示例 The application attribute with name test1 matches the string "blah". The application attribute with name test1 does not match the string "blah".
示例說明 判定application中屬性test1的值是否為blah。

標簽名 existsAttribute
Tag Body JSP
作用 判定application中是否存在指定名稱的屬性。
使用示例 The application attribute with name test1 exists. The application attribute with name test1 does not exist.
示例說明 判定application中是否有名為test1的屬性。

標簽名 removeAttribute
Tag Body empty
作用 從application中刪除指定名稱的屬性。
使用示例
示例說明 刪除application中名為test1的屬性。

標簽名 setAttribute
Tag Body JSP
作用 設定application中指定屬性的值。
使用示例 Test Value
示例說明 設定application中test1的屬性值為Test Value。

1.2.2 Application初始化參數標簽

標簽名 initParameter
Tag Body empty
作用 得到application中指定參數的值。
使用示例
示例說明 得到application中參數test1的值。

標簽名 initParameters
Tag Body JSP
作用 遍歷application中所有初始化參數或得到特定參數的值。
使用示例 Name: Value:
示例說明 輸出application中所有初始化參數的名稱和值。
使用示例 Name: Value:
示例說明 得到application中參數test1的值。

標簽名 equalsInitParameter
Tag Body JSP
作用 判定application中某參數的值是否與指定值相同。
使用示例 The initialization parameter with name test1 matches "blah". The initialization parameter with name test1 does not match "blah".
示例說明 判定application中參數test1的值是否為blah。

標簽名 existsInitParameter
Tag Body JSP
作用 判定application中是否存在指定名稱的參數。
使用示例 The initializaion parameter with name test1 exists. The initialization parameter with name test1 does not exist.
示例說明 判定application中是否存在參數test1。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宁德市| 顺昌县| 长乐市| 资溪县| 延川县| 孟州市| 湖南省| 通化县| 铜山县| 东方市| 麻阳| 克山县| 遵义县| 安吉县| 会东县| 剑河县| 思茅市| 新密市| 凤阳县| 靖西县| 汉源县| 平和县| 土默特左旗| 平顶山市| 姚安县| 都匀市| 弥勒县| 陇川县| 同心县| 临沂市| 汉中市| 子长县| 海口市| 双辽市| 肥乡县| 威宁| 塘沽区| 信宜市| 精河县| 舒兰市| 烟台市|