O'Reilly logo

Java EE 6 with GlassFish 3 Application Server by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JSP custom tags

JSP technology allows software developers to create custom tags. Custom tags can be used in JSP along with standard HTML tags. There are several ways of developing custom tags. In this section, we will discuss the two most popular ways: extending the javax.servlet.jsp.tagext.SimpleTagSupport class and creating a tag file.

Extending SimpleTagSupport

One way we can create custom JSP tags is by extending the javax.servlet.jsp.tagext.SimpleTagSupport class. This class provides default implementations of all methods in the javax.servlet.jsp.tagext.SimpleTag interface plus some methods not defined in this interface. In most cases, all that needs to be done to create a custom tag this way is override the SimpleTagSupport.doTag() method ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required