Create your first custom JSP TAG (JSP tag) 2

xiaoxiao2021-03-06  64

TLD is a simple XML file that provides JSP TAG information in detail; create a new demotags.tld Save in / web-inf / tlds file, code:

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

1.0

1.1

Demotags

http://www.stardeveloper.com

Demo Tags Library

firsttage

com.stardeveloper.tag.test.firsttag

Empty

Your First JSP Tag

Name

false

Tag Library Descriptor Note: All content is between and ,

provides your Tag Library information, almost the same in all tags; 1.0 notices the current Tag Library version; 1.1 specified JSP version; Demotags Indicates the name of Tag Library; http://www.stardeveloper.com : There is not much place; and demo tags library is a simple description Now let's take a look at and ; firstttag com.stardeveloper.tag.test.FirstTAG EMPTY Your First JSP Tag name false name is short before the prefix of JSP Name, such as firsttag In tagclass will contain complete JSP TAG CLASS path BodyContent should include the following: tagDependnt, JSP and EMPTYATTRIBUTE TAG Describes each property, in this example, Required is set to false, So this TAG can be used without having to enter any plants.

转载请注明原文地址:https://www.9cbs.com/read-96860.html

New Post(0)