Detailed explanation of the basic structure of JSP, detailed explanation of JSP Composition
Example:
<! -- Command identifier in JSP --> <% @ page language = "java" contentType = "text/html; charset = gb2312" %> <% @ page import = "java. util. date "%> <! -- HTML Markup Language -->
I. command ID in JSP
JSP commands allow the server to execute actions and set valid attributes throughout the JSP page according to the instructions.
For example
The first page command specifies that the language used to write JSP scripts on the page is Java, and the MIME type and JSP character encoding of the page response are also specified;
The function implemented by the second page command is similar to the import Statement in Java, which is used to import the required package files to the current JSP file.
2. HTML Markup Language
The HTML Tag serves as static content on the JSP page. The browser recognizes and executes these HTML tags. In JSP program development, these HTML Markup languages are mainly responsible for page layout, design, and appearance. They can be called the webpage framework.
3. embedded Java code snippets
The Java code embedded in the JSP page can only be invisible in the client browser in <%>. They need to be executed by the server, and then the server sends the execution results in the same way as the HTML markup language to the client for display. By embedding Java code into a JSP page, the page can generate dynamic content, so jsp is a dynamic web page
4. JSP expressions
JSP expressions are mainly used for data output. It can output content to the page and display it to users. It can also be used to dynamically specify the attribute values in HTML tags.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.