Custom tags in JSP

Custom tags :
Custom tags are usually distributed in the form of a tag library, which defines a set of related custom tags and contains the objects that implement the tags.

Ex:-
<%@ taglib uri="/WEB-INF/tld/taglib.tld" prefix="custom" %>

what is Custom tags?

A custom tag is a user-defined JSP language element. When a JSP page containing a custom tag is translated into a servlet, the tag is converted to operations on an object called a tag handler. The Web container then invokes those operations when the JSP page’s servlet is executed.

Custom tags have a rich set of features. They can

  • Be customized via attributes passed from the calling page.
  • Access all the objects available to JSP pages.
  • Modify the response generated by the calling page.
  • Communicate with each other. You can create and initialize a JavaBeans component, create a variable that refers to that bean in one tag, and then use the bean in another tag.
  • Be nested within one another, allowing for complex interactions within a JSP page.

Popularity: 1% [?]

You can leave a response, or trackback from your own site.

Leave a Reply

Designed by: Business Web Hosting | Thanks to Buy Icons, travel tips and Used Cars