O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

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

Summary

Tag Libraries (TagLibs) define one or more custom tags that can be used to extend the capabilities of JSP. Judicious use of TagLibs can remove most, if not all, of the Java scriptlets from your Web pages. Encapsulating the Java code in a custom tag will

  • Simplify the writing of Web pages

  • Reduce development time by removing awkward Java compiler errors from the JSP-generated code

  • Integrate business logic constructs more closely into the JSP syntax

Custom tags can provide programming constructs, such as iteration and selection (if statements) for your Web pages. Custom tags can also

  • Use attributes to pass information from the Web page to the Java code

  • Create scripting variables that can be used on the Web page

  • Share information between tags ...

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