O'Reilly logo

Enterprise Java Programming with IBM WebSphere by Daniel Berg, Greg Hester, Mark Weitzel, Gary Craig, David Pitt, Jim Amsden, Kyle Brown, Russell Stinehour, Peter M. Jakab

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

Chapter 11. Tag Libraries and Custom Tags

Introduction

The JSP specification defines a very limited set of standard actions, but it also defines a mechanism to make JSPs extensible. These custom (actions) tags provide an opportunity to design special presentation logic, factored into reusable components and callable from within JSP via a tag, or XML markup, syntax.

One aspect of JSP syntax that is a feature—and, in some ways, a drawback—is the ability to write any arbitrary Java logic, via scriptlets and declarations, commingled with HTML syntax within the same JSP file. This can lead to JSP source that is both hard to read and maintain. We recommend that a JSP should be predominantly HTML.

So while the combination of these syntaxes is easily expressed ...

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