What are implicit objects? What does it mean?

前端 未结 7 1581
谎友^
谎友^ 2020-12-30 01:52

Whenever I study JSP and Servlets I come across word implicit objects, what does the term mean?

How they are called in my program without instantiat

7条回答
  •  礼貌的吻别
    2020-12-30 02:17

    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:

    • request : This is the HttpServletRequest object associated with the request.
    • response : This is the HttpServletResponse object associated with the response to the client.
    • out : This is the PrintWriter object used to write any data to buffer.
    • session : This is the HttpSession object associated with the request.
    • application : This is the ServletContext object associated with application context.
    • config : This is the ServletConfig object associated with the page.
    • pageContext : This encapsulates use of server-specific features like higher performance JspWriters.
    • page : This is simply a synonym for this, and is used to call the methods defined by the translated servlet class.
    • Exception : The Exception object allows the exception data to be accessed by designated JSP.

提交回复
热议问题