Bean Persistence

Now that you have this simple Bean, you can start to play with it using JSP. JSP uses a persistence model that lets you maintain a Java object for the scope of the current page, the current request, the current user session, or the entire time that the server is running. These four types of persistence are referred to as page scope, request scope, session scope, and application scope.

  • An object with page scope is available during the evaluation of this JSP only. This means that if the request is forwarded to another page in the same application, the object will not be preserved.

  • An object stored with request scope is available during the entire processing of the current request from a client. This object will be preserved if the ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.