O'Reilly logo

JavaServer Pages™, Second Edition by Larne Pekowsky

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 3. Using Beans

The examples in Chapter 2 were quite simple, although they did illustrate a few important points. Notably, these examples demonstrated how a JSP file is converted into a little program and how this program can then perform certain actions when it is run. What is needed now is a mechanism for pages to react to user input and other data.

A page may need to react to such information in any of several ways. For example, a page that displays a stock portfolio typically uses green text to show the stocks that have increased in value and uses red to show those that have decreased in value. Here the page needs to display a value and also change an aspect of its appearance, based on the value.

A page might also want to use a value ...

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