Predefined Variables in JSP
What are the Predefined Variables available in Java Servlet Pages?
Explanation
To make things simple, there are some predefined variables in JSP that need not be declared. These variables can be used with servlets and Java beans. Following are the list of predefined variables.
request:
This variable specifies the data included in a http request. This variable takes value from the clients' browser to pass it over to the server.reponse:
This variable specifies the data included in the http response. It is used with cookies and also in http headers.
out:
This variable specifies the output stream otherwise known as printwriter in a page context.
session:
This variable specifies the data associated with httpsession object with a specific session of a user. The main purpose of this object is to use the session information to maintain multiple page requests.
application:
This variable is used to share data with all application pages.
Config:
This variable refers the java servlet configuration value.
pagecontext:
This variable is used to store the environment for the page like page attributes, access to the request, response and session objects.
page:
This variable is used to store the instance of the generated java servlet.