JSP four kinds of scopes, respectively page, request, session, application.
All four can be used setattribute ("," "); GetAttribute ("", ""); where page is used, Pagecontext.setattribute ("", "" ");
Page: Scopes are limited to the current Page object, which is valid only on the same page. When you leave the current JSP page (either redirect or forward), all property values in the PageContext are lost.
Request: The scope is within the same request, when the page jumps, if the forward way to jump, then the forward target page can still get the property value in Request. If the page jumps by redirect, the value of the attribute in the request is lost in this scenario because redirect is the equivalent of a re-issued request.
Session: The scope is the duration of the user and the server is connected to the time, but disconnected from the server, this property is invalid
Application: The global scope, the entire application is shared, the scope is the largest, as long as the server does not stop, the Application object exists.
Four ranges of JSPs