Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the built-in objects in JSP

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "what are the built-in objects in JSP". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In the execution process of JSP, first, the user sends a request to the server, and the server looks for the response jsp page after receiving the request, then the server translates the jsp page into .java file, and then compiles it to get .class bytecode file. The server executes the class file to convert it into html stream response to the client, and the client gets the html stream and then translates it into the page. At this point, the jsp execution process is complete.

JSP's instruction

Concept: what is the JSP instruction? simply put, the JSP instruction is responsible for telling the JSP engine how to translate the jsp page into servlet, and controlling some features of the jsp page runtime by setting the properties of the jsp.

Note: the jsp instruction is made up of, it should be noted that jsp itself is actually a servlet, it is only a template that standardizes the html code, in essence, it is a servlet,jsp that is mainly used for page display.

The three main instructions are as follows:

(1) page: page setup instruction, including import guide package, type of contentType content, language scripting language, session, configuration errpage error page, whether isErrorPage is an error handling page

(2) include, which contains instructions, is divided into static inclusion and dynamic inclusion. Its main function is to reference written htmll pages.

(3) taglib, custom tag library

Nine built-in objects in JSP

(1) pageContext: special object, you can get the other eight objects, and you can use the methods of the other eight objects

(2) page: represents the current page, which can be used to call methods in servlet

(3) request: get the request information of the user

(4) response: the server responds to client requests

(5) session: the information used to save each user is stored in the server.

(6) application: indicates the site information. The scope is for the site. As long as the server is not shut down, the information will not become invalid.

(7) config: server configuration information, and initialization parameters can be obtained.

(8) out: used for page output, which is actually the getWrite () method

(9) exception: exception information

This is the end of the content of "what are the built-in objects in JSP"? thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report