欢迎光临
我们一直在努力

JSP中的TagLib应用(2)–zt-JSP教程,Jsp/Servlet

建站超值云服务器,限时71元/月

jsp中的taglib应用(2)

2、开始

现在让我们逐步深入的了解xml在jsp中的应用吧.

首先需要定义tld文件和相应tag处理的java类文件.然后在jsp通过定义的语法使用tag,

让我们来看看下面这个xml文件。

==================taglib.tld===========================

public "-//sun microsystems, inc.//dtd jsp tag library 1.1//en"

"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

1.0

1.1

java pet store demo custom tags

insert

com.sun.estore.taglib.inserttag

jsp

an insertion tag

id

false

true

template

true

true

parameter

true

true

createtemplate

com.sun.estore.taglib.createtemplatetag

jsp

create a template object and store in the request with the specified name

id

false

true

template

true

true

screen

true

true

screen

com.sun.estore.taglib.templatescreentag

jsp

a template screen object

screen

true

true

parameter

com.sun.estore.taglib.templateparametertag

jsp

a template parameter object

parameter

true

true

value

true

true

direct

true

true

===========================================================
这是j2ee blueprints 里提供的sample——pet store里面的一个tld文件。

下面对tld文件进行说明

taglib descriptor 

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » JSP中的TagLib应用(2)–zt-JSP教程,Jsp/Servlet
分享到: 更多 (0)

相关推荐

  • 暂无文章