Scope refers to an area in which an object (such as a Bean or any Java class) can be stored. Scopes differ based on the length of time stored objects are available for reference, as well as where the objects can be referenced from. In JSP and Struts, scope can be one of four values:
Page: Objects in the page scope are available only while the page is responding to the current request. After control leaves the current page, all objects stored in the page scope are destroyed.
Request: Objects in the request scope are available as long as the current request is being serviced. A request can be serviced from more than one page.
Session: The objects in the session scope last as long as the session exists. This could be until the user logs out and the session is destroyed or until the session times out due application has a unique session.
Application: The longest lasting scope is the application scope. As long as the application is running, the objects exist. Furthermore, objects in the application scope are available to all clients using the application. to inactivity. Each client using the Web.