Detailed explanation of the basic structure of JSP, detailed explanation of JSP Composition

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.