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 ...

Get Enterprise Java Programming with IBM WebSphere now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.