O'Reilly logo

Advanced JavaServer Pages™ by David M. Geary

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 2. CUSTOM TAG ADVANCED CONCEPTS

Topics in this Chapter

  • Body Tag Handlers

  • Iteration

  • Scripting Variables

    • Storing Beans in Page Scope

    • Specifying Scripting Variable Information

    • Associating a Tag Handler and Scripting Variables

    • Using Custom Tag IDs

  • Body Content

    • Understanding How Body Content Works

    • Generating JavaScript

  • Nested Tags

    • Locating Ancestor Tags

    • Sharing Data

  • Conclusion

Sophisticated custom tags often manipulate their body content; for example, a custom tag could wrap its body content in an HTML SELECT tag, so that tag might be used like this—

<html:links name='api'>
   <option value='Servlets'>servlets</option>
   ...
</html:links>

—and end up producing HTML like this:

 <select name='api' onChange='this.form.submit()'> <option value='Servlets'>servlets</option> ...

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