Sunday 20 July 2014

What are the Implicit Objects in JSP?

             JSP Implicit Objects are the Java objects that the JSP Container makes available to developers in each page and developer can call them directly without being explicitly declared. JSP Implicit Objects are also called pre-defined variables.

    JSP supports nine Implicit Objects which are listed below:

 1) request :
            This is the HttpServletRequest object associated with the request.

 2) response :
           This is the HttpServletResponse object associated with the response to the client.

 3) out :
         This is the PrintWriter object used to write any data to buffer.

 4) session :
         This is the HttpSession object associated with the request.

  5) application :
         This is the ServletContext object associated with application context.

  6) config :
         This is the ServletConfig object associated with the page.

  7) pageContext :
        This encapsulates use of server-specific features like higher performance JspWriters.

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

  9) Exception :
         The Exception object allows the exception data to be accessed by designated JSP.

No comments:

Post a Comment