How the Java code embedded in the JSP performs the effect on HTML

Source: Internet
Author: User

Tags: embedding ali tag output scope current time Code execution HTML nbsp

1 Direct output HTML tags embedded in HTML

<body>

<h1> Show current time and date </h1>

<%

Date date = new Date ();

Out.print ("<h2 align=\" Center\ ">" + date.tostring () + "</h2>");

%>

</body>

The position of the out in the HTML is the position of the label.

2 Using variables to influence

Scope of the 2.1 JSP variable

2.2

How the Java code embedded in the JSP performs the effect on HTML

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.

Tags Index: