BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

JSP Implicit Objects

Last Updated: July 27, 2022 by Chaitanya Singh | Filed Under: JSP tutorial

JSP implicit objects are created by JSP Engine during translation phase (while translating JSP to Servlet). They are being created inside service method so we can directly use them within Scriptlet without initializing and declaring them. There are total 9 implicit objects available in JSP.

Implicit Objects and their corresponding classes:

Implicit Object Class
out javax.servlet.jsp.JspWriter
request javax.servlet.http.HttpServletRequest
response javax.servlet.http.HttpServletResponse
session javax.servlet.http.HttpSession
application javax.servlet.ServletContext
exception javax.servlet.jsp.JspException
page java.lang.Object
pageContext javax.servlet.jsp.PageContext
config javax.servlet.ServletConfig

9 Implicit objects in JSP

  1. Out: This is used for writing content to the client (browser). It has several methods which can be used for properly formatting output message to the browser and for dealing with the buffer.
    Read full article here » OUT implicit object with examples.
  2. Request: The main purpose of request implicit object is to get the data on a JSP page which has been entered by user on the previous JSP page. While dealing with login and signup forms in JSP we often prompts user to fill in those details, this object is then used to get those entered details on an another JSP page (action page) for validation and other purposes.
    Read full article here » Request implicit object with examples.
  3. Response: It is used for modifying or dealing with the response which is being sent to the client(browser) after processing the request.
    Read full article here » Response implicit object with examples.
  4. Session: It is most frequently used implicit object, which is used for storing the user’s data to make it available on other JSP pages till the user session is active.
    Read full article here » Session implicit object with examples.
  5. Application: This is used for getting application-wide initialization parameters and to maintain useful data across whole JSP application.
    Read full article here » Application implicit object with examples.
  6. Exception: Exception implicit object is used in exception handling for displaying the error messages. This object is only available to the JSP pages, which has isErrorPage set to true.
    Read full article here » Exception implicit object with examples.
  7. Page: Page implicit object is a reference to the current Servlet instance (Converted Servlet, generated during translation phase from a JSP page). We can simply use this in place of it. I’m not covering it in detail as it is rarely used and not a useful implicit object while building a JSP application.
  8. pageContext: It is used for accessing page, request, application and session attributes.
    Read full article here » pageContext implicit object with examples.
  9. Config: This is a Servlet configuration object and mainly used for accessing getting configuration information such as servlet context, servlet name, configuration parameters etc.
    Read full article here » Config implicit object with examples.
❮ JSP Declaration TagJSP request ❯

Top Related Articles:

  1. Out Implicit Object in JSP with examples
  2. Java Server Pages (JSP) Life Cycle
  3. JSP Scriptlet Tag (Scripting elements)
  4. Request Implicit Object in JSP with examples
  5. Session Implicit Object in JSP with examples

About the Author

I have 15 years of experience in the IT industry, working with renowned multinational corporations. Additionally, I have dedicated over a decade to teaching, allowing me to refine my skills in delivering information in a simple and easily understandable manner.

– Chaitanya

Comments

  1. vinod says

    June 14, 2016 at 10:27 PM

    all the examples and content written in this site are very helpful and easy to understand..thnx for creating this site

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

JSP Tutorial

  • Basics of JSP
  • Life cycle of JSP
  • JSP in Eclipse IDE

Scripting Elements

  • Scriptlet Tag
  • Expression tag
  • Declaration tag

Implicit Objects

  • Implicit Objects
  • JSP Request
  • JSP Response
  • JSP Config
  • JSP Application
  • JSP Session
  • JSP Out
  • JSP pageContext
  • JSP Exception
  • Validate session

JSP directives

  • JSP Directives
  • Include Directive

JSP Exception

  • Exception handling

JSP Action

  • Action tags
  • Include action
  • Forward action
  • useBean, setProperty & getProperty

Expression language

  • Expression language

JSP Custom Tags

  • Custom Tags
  • Custom tag example
  • JSP Interview Q

Copyright © 2012 – 2025 BeginnersBook . Privacy Policy . Sitemap