-
In Example 21 an
instance of an external Java class was used in the JSP
-
Such beans can be used for several purposes
-
To hold session state
-
To hold Java code that does not have embedded HTML but is used in the JSP
-
To process input from forms easily
-
Example 22 shows part
of the source code for the bean from the auction system
-
formatAmount() is a UI helper routine; pure Java code, but totally concerned
with the UI
-
getUser() is a session state method; it returns the User bean for the current
client
-
getItemHome() is a utility routine; pure Java code that is not UI related
|