标签库使用指南1-Application标签库

来源:互联网 发布:怎样成为淘宝分销商 编辑:程序博客网 时间:2024/06/18 09:07
<script type="text/javascript">google_ad_client = "pub-8800625213955058";/* 336x280, 创建于 07-11-21 */google_ad_slot = "0989131976";google_ad_width = 336;google_ad_height = 280;//</script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>1.Application Tag LibraryAPPLICATION标签库中包含的标签用来访问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.1Application属性标签标签名attributeTag Bodyempty作用得到application中某个属性的值使用示例示例说明输出application中名为test1的属性的值。标签名attributesTag BodyJSP作用遍历application中所有的属性或得到特定属性的值使用示例Name: Value: 示例说明输出application中所有属性的名称和值。使用示例Name: Value: 示例说明输出application中属性myatt的名称和值。标签名equalsAttributeTag BodyJSP作用判断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。标签名existsAttributeTag BodyJSP作用判断application中是否存在指定名称的属性。使用示例 The application attribute with name test1 exists. The application attribute with name test1 does not exist.示例说明判断application中是否有名为test1的属性。标签名removeAttributeTag Bodyempty作用从application中删除指定名称的属性。使用示例示例说明删除application中名为test1的属性。标签名setAttributeTag BodyJSP作用设定application中指定属性的值。使用示例Test Value示例说明设定application中test1的属性值为Test Value。1.2.2Application初始化参数标签标签名initParameterTag Bodyempty作用得到application中指定参数的值。使用示例示例说明得到application中参数test1的值。标签名initParametersTag BodyJSP作用遍历application中所有初始化参数或得到特定参数的值。使用示例Name: Value: 示例说明输出application中所有初始化参数的名称和值。使用示例Name: Value: 示例说明得到application中参数test1的值。标签名equalsInitParameterTag BodyJSP作用判断application中某参数的值是否与指定值相同。使用示例 The initialization parameter with name test1 matches "blah". The initialization parameter with name test1 does not match "blah".示例说明判断application中参数test1的值是否为blah。标签名existsInitParameterTag BodyJSP作用判断application中是否存在指定名称的参数。使用示例 The initializaion parameter with name test1 exists. The initialization parameter with name test1 does not exist.示例说明判断application中是否存在参数test1。
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 辽阔的近义词 辽阔的反义词 幅员辽阔的意思 我国幅员辽阔东西相距5200千米 辽阔什么意思 辽阔是什么意思 辽阔造句三年级 辽阔和广阔的区别 在这片辽阔的土地上 描写草原辽阔的词语 广阔和辽阔的区别 遥远的东方辽阔的边疆 辽阔的近义词是什么标准答案 中国幅员辽阔 辽阔的近义词是什么 辽阔无边打一字 辽阔的近义词和反义词 辽阔广阔和宽阔的区别 辽阔的反义词是什么 辽阔的意思是什么 辽阳 辽阳马拉松 辽阳市 辽阳景点 辽阳邮编 辽阳招聘 辽阳县 辽阳旅游 辽阳到沈阳 沈阳到辽阳 沈阳辽阳 辽阳洗浴 辽宁辽阳 辽阳特产 辽阳动物园 辽阳温泉 辽阳核伙沟 辽阳在哪 辽阳在哪里 辽阳吧 辽阳至沈阳