博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
EL表达式小节一下
阅读量:4229 次
发布时间:2019-05-26

本文共 594 字,大约阅读时间需要 1 分钟。

<jsp:useBean id="person" class="com.mr.bean.Person"/>
${person }<br><!-- 相当于request.getAttribute("person") -->
年龄:${person.age }<br>
性别:${person.sex }<br>
测试+:${1+2 }<br>
测试科学计数:${1.2E4+1.4 }<br>
测试减法:${3-1 }<br>
测试除法:${6/2 }<br>
测试取余:${5%2 }<br>
三目运算符:${1==2 ? 3 :4 }<br>
测试小于:${1<2 }<br>
多运算:${(10*10)!=100 }<br>
支持且或非的多个比较运算:${1!=2&&3!=4 }<br>
可以用于字符串的比较:${'hip'>'hit' }<br>
可以判断是否为null,字符串是否为空

${empty person }<br>

输出:

com.mr.bean.Person@7593290c
年龄:11
性别:男
测试+:3
测试科学计数:12001.4
测试减法:2
测试除法:3.0
测试取余:1
三目运算符:4
测试小于:true
多运算:false
支持且或非的多个比较运算:true
可以用于字符串的比较:false
可以判断是否为null,字符串是否为空 false

转载地址:http://uvjqi.baihongyu.com/

你可能感兴趣的文章
System Architecture with XML
查看>>
Microsoft SQL Server 2005 Stored Procedure Programming in T-SQL & .NET
查看>>
Sams Teach Yourself Microsoft Office Access 2003 in 24 Hours
查看>>
Leveraging Web Services: Planning, Building, and Integration for Maximum Impact
查看>>
Implementing Backup and Recovery: The Readiness Guide for the Enterprise
查看>>
Wireless Communications over MIMO Channels: Applications to CDMA and Multiple Antenna Systems
查看>>
UMTS Performance Measurement: A Practical Guide to KPIs for the UTRAN Environment
查看>>
Grid Networks: Enabling Grids with Advanced Communication Technology
查看>>
Communication Systems for the Mobile Information Society
查看>>
Beginning Ubuntu Linux: From Novice to Professional
查看>>
IPsec Virtual Private Network Fundamentals
查看>>
Algorithms and Networking for Computer Games
查看>>
Java Regular Expressions: Taming the java.util.regex Engine
查看>>
CSS Instant Results
查看>>
The Vest Pocket Guide to Information Technology
查看>>
Beginning MySQL
查看>>
Uncertainty and Information: Foundations of Generalized Information Theory
查看>>
Professional Web APIs with PHP: eBay, Google, Paypal, Amazon, FedEx plus Web Feeds
查看>>
Cases on Information Technology Planning, Design And Implementation
查看>>
SQL For Dummies
查看>>