JSP sharing data among pages



JSP sharing data among pages

JSP sharing data among pages

#techlearners #jsp

JSP Variables, Methods and Classes
In a JSP page Variable, methods and class can be declared. If they are declared in the declaration section they become part of the class.
Variable declared in the declaration section become instance variables and are accessible from any method of the JSP page’s Servlet class.

Variable declared in the declaration section are available in Scriptlet section

Sharing data between pages
All JSP pages participate in an http session. The session object has session scope and is thus shared among all the pages within the session.
The session object can be used as a shared repository of information such as beans and objects among JSP pages of the same session.

TECHLEARNERS BY NEERAJ SAXENA
http://www.techlearners.co.in