JSP (Java Server Page)

Source: Internet
Author: User
Tags html comment

Introduction to JSP

Java Server Page, is a Java page running on the server side, a dynamic Web page technical standards. The actual nesting of Java scripting languages is in HTML.

JSP syntax page directive: Defines the global attributes in a JSP file by setting multiple properties inside it. Syntax for the page directive:

<%@ page language= "java" import= "property value" contenttype= "text/html; Charset=utf-8"

pageencoding= "UTF-8"%>

The Language property is used to specify the language used by the JSP, which defaults to Java

The Import property is used to refer to the class used in the scripting language

The ContentType property is used to specify the MIME type of the page-generated content

CharSet the encoding format for sending content to the client browser.

pageencoding The encoding format of the JSP script content.

JSP%> nested Java scripting language through <% Java code jsp Comments: HTML comment:<!--Html-->, the content of this comment can be seen in the way the browser views the source code JSP Comment: <%--jsp comment--> the content of the comment is not visible in the browser by viewing the source code JSP script Comment: <%//single line comment%> <%/* Multiline comment */%> the output of the JSP displays display output of 1.out objects: the effect of out objects outputting data to the client

Common method: Out.printin () displays the page output and adds a newline at the end of the display.

Out.print () is displayed to the page output.

JSP (Java Server Page)

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.