当前位置:网站首页>JSP learning 1
JSP learning 1
2022-04-23 16:06:00 【If you believe】
<%@ page contentType="text/html; charset=UTF-8" pageEnconding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title> know jsp</title>
</head>
<body>
1、<%--jsp notes --%>
And html Notes <!----> difference : The front page can see html Notes , and jsp Your comments won't be seen
2、jsp Of Java Code block
<%--
stay jsp Want to write in Java Code , And the execution needs to be written to
<%
Java Code block
%>
Must end with a semicolon , You cannot add an access control character when declaring variables ( Such as :private), Can't define method , Static code blocks cannot be defined
--%>
<%
String a=" handsome guy ";
System.out.println(a);
%>
3、 Declaration block
<%--
<%! Statement statement %>
You can add access , You can define methods , You can define static code blocks
--%>
<%!
public void hu(){
System.out.println("lllll");
}
%>
<%
hu();
%>
4、 Expression block
<%
String a="kkk";
%>
<%=a%><%-- Plus the equal sign can be output directly --%>
</body>
</html>
版权声明
本文为[If you believe]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231404212182.html
边栏推荐
- Solution to the fourth "intelligence Cup" National College Students' IT skills competition (group B of the final)
- 捡起MATLAB的第(3)天
- Jour (9) de ramassage de MATLAB
- leetcode-374 猜数字大小
- C, calculation method and source program of bell number
- Vision of building interstellar computing network
- Config learning notes component
- Cloud migration practice in the financial industry Ping An financial cloud integrates hypermotion cloud migration solution to provide migration services for customers in the financial industry
- Day (7) of picking up matlab
- Day (10) of picking up matlab
猜你喜欢

Download and install mongodb

WPS brand was upgraded to focus on China. The other two domestic software were banned from going abroad with a low profile

MySQL - MySQL查询语句的执行过程

What is cloud migration? The four modes of cloud migration are?

Spark 算子之groupBy使用

Spark 算子之partitionBy

Config组件学习笔记

Partitionby of spark operator

5 minutes, turn your excel into an online database, the magic cube net table Excel database

Metalife established a strategic partnership with ESTV and appointed its CEO Eric Yoon as a consultant
随机推荐
R语言中绘制ROC曲线方法二:pROC包
CVPR 2022 quality paper sharing
Using JSON server to create server requests locally
Unity shader learning
The system research problem that has plagued for many years has automatic collection tools, which are open source and free
捡起MATLAB的第(7)天
JS regular determines whether the port path of the domain name or IP is correct
js正則判斷域名或者IP的端口路徑是否正確
New developments: new trends in cooperation between smartmesh and meshbox
Homewbrew installation, common commands and installation path
Win11/10家庭版禁用Edge的inprivate浏览功能
Gartner predicts that the scale of cloud migration will increase significantly; What are the advantages of cloud migration?
C#,贝尔数(Bell Number)的计算方法与源程序
Countdown 1 day ~ 2022 online conference of cloud disaster tolerance products is about to begin
[AI weekly] NVIDIA designs chips with AI; The imperfect transformer needs to overcome the theoretical defect of self attention
【现代电子装联期末复习要点】
Hyperbdr cloud disaster recovery v3 Version 2.1 release supports more cloud platforms and adds monitoring and alarm functions
Install redis and deploy redis high availability cluster
The biggest winner is China Telecom. Why do people dislike China Mobile and China Unicom?
How do you think the fund is REITs? Is it safe to buy the fund through the bank