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
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Scriptlets

Scriptlets

<% ...java code... %>

Scriptlets allow arbitrary Java code, and eventually other languages, to be placed in a JSP. For the most part such code should reside in beans and other classes, but there are times when placing it in a page is unavoidable. Complex logic can be added to pages by surrounding regions of text with scriptlets, where one scriptlet ends with an opening brace and a second one provides the matching close. Scriplets were first seen in Listing 6.2


  

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