Java Learning -033-javaweb_002--The basic knowledge of Web Markup Language JSP

Source: Internet
Author: User
Tags html form

JSP is a Web page technical standard advocated by Sun company. In the HTML file, the addition of Java code constitutes a JSP Web page, when the WEB server to access the JSP request, the first execution of the Java Program source code, and then returned in HTML form, Java program run on the server, the final display on the client. JSP originates from Java, so the JSP environment depends on the JDK, and of course the server software (such as TOMCAT, etc.).

First, the operating environment to build

1. To install the JDK, please refer to the previous blog post:Java learning -001-jdk installation configuration

2. Tomcat deployment and environment variable configuration, see previous blog post:java Learning -032-javaweb_001-tomcat environment deployment and basic configuration

Second, the basic syntax of JSP

In addition to HTML tags, JSP has 4 elements that are needed to build Web content, as follows:

Directive (Directive)

Statement (Declaration)

Source Code (Scriptlet)

Expressions (expression)

JSP directives are used to set the related properties of the entire JSP page, such as the page scripting language, the Java package name and the page encoding character set that need to be imported, and the syntax format of the JSP Directive: <%@ directive Name attribute = "Value"%>. JSP directives include: page, include, taglib 3 instructions.

The format of the declared property is as follows:

<%!    String JSP = "DECLARE attribute format";%>

The format of the declaring method is as follows:

<%!    Void Jsp_method    {};%>

JSP and HTML code are separated by <%......%>, and the format of the JSP language is as follows:

<%     Java Source code%>

Third, JSP annotation method

Show comments: The format of the display comments embedded in the JSP page is as follows:

<!--show comments--

Implicit comments: The format for embedding implicit annotations on a JSP page is as follows:

<%!--Implicit annotation--%>

At this point, Java Learning -033-javaweb_002-Web Markup Language JSP basic knowledge of the smooth end, I hope this article can give beginners javaweb you a reference.

Finally, very grateful to the pro-stop, I hope this article can be pro helpful. Warmly welcome the kiss to discuss together and progress together. Thank you so much! ^_^

Java Learning -033-javaweb_002--The basic knowledge of Web Markup Language JSP

Related Article

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.