所谓的Tag File就是让JSP网页开发人员可以直接使用JSP语法制作标签,而不需了解Java语言。
所有的Tag File的文件的后缀名为.tag或者.tagx.假如Tag File包含其它的完整的或者片断的Tag File,Jsp2.0规范建议后缀名为.tagf。
抛弃了java代码,以后调整样式更加方便
一下为jforum3的试例代码:
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:remove var="extraArgs"/>
<c:choose>
<c:when test="${page != info.thisPage}">
<c:choose>
<c:when test="${!isSearch}">
<c:if test="${page > 1}">
<c:set var="extraArgs" value="/${page}"/>
</c:if>
<c:if test="${info.id > 0}">
<c:set var="extraArgs" value="${extraArgs}/${info.id}"/>
</c:if>
<a href="<jforum:url address='${info.baseUrl}${extraArgs}'/>">${page}</a>
</c:when>
<c:otherwise>
<c:set var="extraArgs">params.query=${searchParams.query}¶ms.matchType=${searchParams.matchType}¶ms.forum.id=${searchParams.forum.id}¶ms.sort=${searchParams.sort}¶ms.sortType=${searchParams.sortType}¶ms.start=${page}</c:set>
<a href="<jforum:url address='${info.baseUrl}'/>?${extraArgs}">${page}</a>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<span class="current">${page}</span>
</c:otherwise>
</c:choose>
分享到:
相关推荐
jsp2.0 tag 的一个简单的使用说明文档,有助于了解tag的使用
1 JSP简介 JSP(JavaServer Pages)是一种基于Java的脚本技术。是由Sun Microsystems公司倡导、许多公司参与... html) to insert Java program segment (Scriptlet) and JSP tag (tag), To form the JSP file(*jsp).
JSP 2.0,重点介绍Java在展示层的两项重要技术:Java Servlet与JavaServer Pages。 它们是最重要的 Java 核心技术。对这两项技术的深入了解,将有助于您未来对于 JavaServer Faces(JSF)技术以及Java Web Services...
Tag File是從JSP 2.0開始新增的功能,主要的目的是讓撰寫JSP網頁的網頁設計人員即使在不懂Java語法的情況下,也可以使用JSP語法來自訂標籤。 簡介 Tag File <jsp: doBody>、<jsp:invoke>與指令元素 Servlet ...
This directive has only one attribute named as file, which is used to include a file in the jsp page at the translation time. <jsp:include page = " ">:- This is known as the include standard action....
this is a java file ,it ...like "id=\"jsp-tag-id\"",you want to get "jsp-tag-id",then you should config start charcter id=" and the end character " ,so will get the content from id="**&&&##$%%anything
noka标签是一组在JSP上远行的支持多种数据库的集数据处理,显示处理于一体的JSP标签,其中有: 编码拦截器工具类 数据表格(DBTable)标签 时间日期(DateOrTime)标签 组合选择框(selectDouble)标签 下拉选择框...
15.2.5 [tag-file]元素 460 15.2.6 [function]元素 461 15.3 传统标签的开发 462 15.3.1 实例一:[hello]标签 462 15.3.2 实例二:[max]标签 465 15.3.3 实例三:[greet]标签 467 15.3.4 实例四:[switch]标签...
noka标签是一组在JSP上远行的支持多种数据库的集数据处理,显示处理于一体的JSP标签,其中有: 编码拦截器工具类 数据表格(DBTable)标签 时间日期(DateOrTime)标签 组合选择框(selectDouble)标签 下拉选择框...
15.2.5 [tag-file]元素 460 15.2.6 [function]元素 461 15.3 传统标签的开发 462 15.3.1 实例一:[hello]标签 462 15.3.2 实例二:[max]标签 465 15.3.3 实例三:[greet]标签 467 15.3.4 实例四:[switch]标签...
JSP Standard Tag Library (JSTL) Section 9.1. Installation of JSTL Section 9.2. c:out Tag Section 9.3. c:forEach and c:forTokens Tags Section 9.4. c:if Tag Section 9.5. c:choose Tag Section 9.6....
15.2.5 [tag-file]元素 460 15.2.6 [function]元素 461 15.3 传统标签的开发 462 15.3.1 实例一:[hello]标签 462 15.3.2 实例二:[max]标签 465 15.3.3 实例三:[greet]标签 467 15.3.4 实例四:[switch]标签...
JSP Standard Tag Library (JSTL) Section 9.1. Installation of JSTL Section 9.2. c:out Tag Section 9.3. c:forEach and c:forTokens Tags Section 9.4. c:if Tag Section 9.5. c:choose Tag Section 9.6....
15.2.5 [tag-file]元素 460 15.2.6 [function]元素 461 15.3 传统标签的开发 462 15.3.1 实例一:[hello]标签 462 15.3.2 实例二:[max]标签 465 15.3.3 实例三:[greet]标签 467 15.3.4 实例四:[switch]标签...
Tag File 我很喜欢用,其实是不错的技术,用的人不多。前后分离了,用的场合更少了
为了省事很多时候希望...@ include file=../../common/include_tag.jsp%> <%@ include file=../../common/page_var.jsp%> <!DOCTYPE HTML> <html> <head> <meta http-equiv=Content-Type co
Servlet~~~~Ch6_SessionBindingActivationListeners~~~~Ch10_SimpleTagHandler~~~Ch10_SimpleTagHandlerWithBody~~~Ch10_SimpleTagHandlerWithExpression~~Ch10_SimpleTagHandlerWithIteratingTheBody~~~Ch10_TagFile
[其他类别]JSP Explorer 文件浏览器 v1.0_fileexplorer [其他类别]jsp+servlet+javaBean实现MVC_jspmvc [其他类别]Jsp考试系统_jspks [其他类别]JSP网页HTML编辑器 v1.0 beat_jsphtmleditor [其他类别]JSP无限级分类...
[其他类别]JSP Explorer 文件浏览器 v1.0_fileexplorer [其他类别]jsp+servlet+javaBean实现MVC_jspmvc [其他类别]Jsp考试系统_jspks [其他类别]JSP网页HTML编辑器 v1.0 beat_jsphtmleditor [其他类别]JSP无限级分类...
c) Tag File 可以让网页开发人员直接使用JSP语法制作标签 d) Tag File的扩展名可以 .tag 参考答案 b 13) 关于Servlet Filter,下列说法正确的有()。 a) Filter 其实就是一个Servlet b) Filter 可以产生...