Taglib Applications in JSP (2)--zt

Source: Internet
Author: User
Tags tld
Taglib applications in JS JSP (2)


2. Start



Now let's take a closer look at the application of XML in JSP.

First you need to define the TLD file and the corresponding tag processing Java class file. Then use tag in the JSP through the defined syntax,

Let's take a look at the XML file below.

==================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

===========================================================
This is a TLD file in the sample------Pet store provided by Java EE blueprints.

The following is a description of the TLD file

TAGLIB Descriptor

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.