JSP implicit objects - Define implicit objects.

Define implicit objects.

- These are the objects that are available for the use in JSP documents.

- They need not be declared.

- These objects are parsed by the JSP engine and inserted into the generated servlet.

- They are the objects that the JSP container makes available to the developers in each page and they can call them directly without declaring them explicitly.

- They are also called as pre-defined variables.

JSP supports nine implicit objects which are as follows:

1. request: It is a HttpServletRequest object associated with the request.

2. response: It is a HttpServletRequest object associated with the response to the client.

3. out: It is the PrintWriter object used to send the output to the client.

4. session: It is the HttpSession object associated with the request.

5. application: It is the ServletContext object associated with the application context.

6. config : It is the ServletConfig object associated with the page.

7. pageContext: It encapsulates the use of server-specific features like higher performance JspWriters.

8. page: It is simply a synonym for this, and is used to call the methods defined by the translated servlet class.

9. Exception: This object allows the exception data to be accessed by the designated JSP.
Difference between forward and sendRedirect
A forward is server side redirect while sendRedirect is client side redirect..
Difference between jsp and servlet life cycles
JSP and Servlet - In JSP's life cycle, after a jsp is translated into a servlet, it behaves in the same way as a servlet...
JSP Scripting Elements - Explain JSP Scripting Elements
JSP Scripting Elements - There are three forms of JSP scripting elements that let you insert Java code into the servlet...
Post your comment