Victor2748
Victor2748

Reputation: 4199

Java jsp taglib

I frequently saw links to "external tag libraries" in jsp Ex:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>

But I couldn't find answers to these questions:

Please edit this question if it's wrong, I never really asked questions of this type

Upvotes: 1

Views: 631

Answers (2)

CuriousMind
CuriousMind

Reputation: 3173

Please refer bold replies

  • Does use a tag library from an external web location? No
    • Does it query that location every time the tag is used? No
    • Does it download it only once? No download so no query
      • when does the download happen? Download never happens
  • Can I create my own tag library, and provide a similar external link to others? Yes

The uri you see the JSP page, is actually referenced from web.xml file, refer to jsp-config.

Upvotes: 2

Henry
Henry

Reputation: 43728

A tag library is part of the application, no download is happening at runtime. The URL you see on the JSP page is just a namespace URI to bind the prefix used on the page to the tag library.

Yes, you can create your own tag library.

Upvotes: 3

Related Questions