当前位置:网站首页>Preliminary use of El expressions
Preliminary use of El expressions
2022-07-22 09:26:00 【weixin_ fifty million one hundred and seventy-nine thousand nin】
I'm a rookie , If there is something wrong in the article , Or the expression is not clear , Please remind me in the comments .java I only studied for a few months , More commonly used jsp, So the content logic of the article is based on jsp Written in actual combat .
In my submission el Expressions are mainly used on pages , With it, the page can be used directly for Circulation and if sentence , Get rid of JavaScript, Save some code , Work well .
First of all el The scope of the expression pageContext. Use it to extract in servlet Save in session Data in ,session Has a long life cycle , Refresh will not reset session Of the data in , So use session To store login ID Or other data , It's more convenient to use .
El Of expression cfoEachr Loops can support and iterate Array of basic data prototype 、 Strings separated by commas 、List aggregate 、SQL Query the row obtained 、Object Instance array wait . How to use cforEach:
Put the set or array that needs iteration in items Element ,var The element represents the data of each index in the iterated data . stay cforEach In the place html label , Insert data into the label , By iteration , There can be several indexes , There are just a few option label .
cif Use of judgment :
Go to test Liser's judgment statement is true Is executed , by false Just skip. .
stay ${ } In braces of , You can also create variables , Then use variables to record values , Then through these statements forEach、if Reference variables , To accomplish some goals
边栏推荐
- h5py快速入门指南
- LeetCode·1720:解码异或后的数组
- Geospatial matrix by province, city and county: multi index data sets such as prefecture level city space and geographical distance matrix
- 各地級市-進出口與貿易差額(2000-2020)
- 数学运算
- Redis原理之HyperLogLog
- OpenGL:freeglut ERROR: Function <glutCreateWindow> called without first calling ‘glutInit‘.
- 1978-2021中国统计年鉴、2003-2019(省、市面板数据)、1999-2019(县域面板数据)
- (一)抖音快手短视频去水印原理分析
- The request was rejected because the URL contained a potentially malicious String “//“
猜你喜欢
Cross border trade terms
Leetcode342:4 power
1978-2021 China Statistical Yearbook, 2003-2019 (provincial and municipal panel data), 1999-2019 (county panel data)
Axure repeater
模拟实现库函数memcpy--复制内存块。详细理解内存重叠及精准复制问题
Leetcode-12: integer to Roman numeral
SerializationException: Could not read JSON: Unrecognized token “xxx“
程序员那些年的斗智斗勇!!!
Go zero micro service practical series (III. API definition and table structure design)
jupyter notebook中切换虚拟环境
随机推荐
聊天室项目
go Redis 管道(pipeline)运用
Analysis of copyonwritearraylist
快乐数~~~(其实我一点都不快乐) && 丑数
OpenGL:freeglut ERROR: Function <glutCreateWindow> called without first calling ‘glutInit‘.
EasyCVR平台V2.5.0版本及以上如何配置WebRTC协议实现低延迟播放?
Eight (variable) basic types
飞机大战分析及代码
Introduction to class loader
Docker series VI Docker installation redis
Review background management system practice: two packaging styles of request parameters
4000+上市公司所属省份、城市、经营等多指标数据已更新至2022.1
Pointer of C language (4)
从103个数中找到出现一次的那三个数
Leetcode · 1720: array after XOR decoding
Luoyang comprehensive bonded zone was officially approved by the State Council to be established
Docker系列 八.Docker下 Mysql 启动慢查询日志
Find the three numbers that appear once from the 103 numbers
EasyCVR平台如何实现无需鉴权即可接入特殊设备?
The request was rejected because the URL contained a potentially malicious String “//“