The main components are:
1. Static content
2. Directives
Page directive: At the top of the page, a page can have multiple page directives.
<%@ Page Property 1 = "" Property 2 = "Property 3=" "%>
Common Properties, language specifies the scripting language used by the current JSP page, which is Java by default. Import references the class library to which the script is used. CONTEXTTYPE Specifies the encoding method. The default value is Text/html,iso-8859-1. Pageencoding page encoding, proposed to modify into ContentType.
Include directive: introduce an external file into the current JSP file and parse the JSP statement for the current page.
TAGLIB directive: Define a custom tag library to use in the JSP.
3. Expressions
4. Small script
Executable Java code. Write in the label <% Java code%>
5. Disclaimer
Define variables or methods. <%! Java Code%>
6. Notes
First, <!--comment Content--HTML comment, client visible
Second, <%--comment content--%> JSP comment, client not visible
Third,//single-line comment/* Comment content */Multiline comment client not visible
Java Learning-jsp Page composition