Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. The Scripting Elements > Embedded Control-Flow Statements

2.4. Embedded Control-Flow Statements

These three Scripting elements themselves are an extremely powerful set of tools to work with. One of their most powerful features comes from one simple fact: together, Scripting elements must form a complete Java statement. The key word is together. Blocks of Java code do not have to be kept within one Scriptlet or Expression. This adds the ability to use Java control–flow statements directly within HTML. While other tools, such as JavaScript, can add data to a Web page, they cannot directly control the static HTML content.

This means that decision-making, looping, and exception blocks can be added directly into HTML. The blocks do not have to be in a single Scriptlet or Expression, but can be broken up into several elements distributed throughout the HTML code.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint