TagLib application in JSP (3-4)

Source: Internet
Author: User

Custom tag location

Uri = "URIToTagLibrary"

The Uniform Resource Identifier (URI) uniquely names a custom tag Based on the tag prefix. The URI can be the following:

? Uniform Resource Locator (URL), defined by RFC 2396,

View http://www.hut.fi/u/jkorpela/rfc/2396/full.html

Uniform Resource Name (URN), defined by RFC 2396

? A relative or absolute path

Prefix = "tagPrefix"

Prefix before the custom tag, for example, in public, if no public is written here,

This is invalid. Do not use jsp, jspx, java, javax, servlet, sun, or sunw as your prefix.

===================================== Template. jsp ==============================

To use this example, go to aspcn.com

========================================================== ========

A jsp file is defined here. This file is composed of tags defined in the previous example.

Through tag processing, jsp program segment running results and some html tag combinations,

Return a complete html result to the browser.

What is interesting here is that different content can be returned for this file based on different parameters. This is the template file.

It is a pity that this article does not talk about this, but only introduces the use of tags in jsp files. If you are interested, you can study it on your own.

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.