SoFunction
Updated on 2025-04-07

A brief discussion on 9 hidden objects in jsp

There are 9 implicit objects in JSP, and I can use these 9 objects directly in JSP.

Because the service method has declared and assigned these nine implicit objects, it can be used directly in JSP.

- pageContext

Type: PageContext

Representative: The context of the current page

Function: You can get other hidden objects in the page, and it is also a domain object.

- request

Type: HttpServletRequest

Representative: Request

Function: It can obtain the request information sent by the user, which is also a domain object.

- session

Type: HttpSession

Representative: Current session

Function: It can be used as a domain object to share data.

- application 

Type: ServletContext

Representative: Represents the entire WEB application

Function: It is the largest domain object in JavaWeb.

- response

Type: HttpServletResponse

Representative: Response

Function: Send response information to the browser

- out

Type: JspWriter

Representative: Output Stream

Function: You can output content to the page

- config

Type: ServletConfig

Representative: Current JSP configuration information

Function: You can obtain the initialization parameters in the Servlet tag

- page

Type: Object There is the following code in the service method: Object page = this;

Representative: Object representing the current JSP

- exception

Type: Throwable

Representative: Exception information

Function: Get exceptions in the page

The above brief discussion of the 9 implicit objects in JSP is all the content I share with you. I hope you can give you a reference and I hope you can support me more.