站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > The J2EE 1.4 Tutorial

What Is a Custom Tag? - The J2EE 1.4 Tutorial

What Is a Custom Tag?

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 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.
  • Pass variables back to the calling page.
  • Access all the objects available to JSP pages.
  • Communicate with each other. You can create and initialize a JavaBeans component, create a public EL variable that refers to that bean in one tag, and then use the bean in another tag.
  • Be nested within one another and communicate via private variables.