I l @ ve RuBoard |
It wouldn't be an overstatement to say that Java Beans are the key to making JSP work. They're the difference between a simple scripting language that lets you put programmatic content on a Web page and a programming environment that lets you leverage all the power of object-oriented design for your application. Java Beans contain state, which is accessed using get and set methods on the Bean. They also have scope in JSP ”either page, request, session, or application. Different scopes allow the bean to persist for different amounts of time. jsp:useBean is used to associate a Bean with a name and a scope on a JSP page. jsp:setProperty is used to apply form values to a Bean. Singleton classes can be used to avoid creating multiple instances of an application-level Bean. In the next chapter, which is the last chapter of pure JSP review, you'll look at servlets along with the request and response objects, which allow you to interact with the page servicing process at a microscopic level. Then you'll be ready to move on to the sample application. |
I l @ ve RuBoard |