Java Tutorial/JSTL/Operators
Содержание
Arithmetic Operator DIV
<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.ru/jstl/fmt" %>
<html>
<head>
<title>EL Expression Examples</title>
</head>
<body>
<h1>EL Expression Examples</h1>
<h2>Arithmetic Operators in Expressions</h2>
<c:out value="${2003 div 8}" />
</body>
</html>
Arithmetic Operator Divide
<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.ru/jstl/fmt" %>
<html>
<head>
<title>EL Expression Examples</title>
</head>
<body>
<h1>EL Expression Examples</h1>
<h2>Arithmetic Operators in Expressions</h2>
<c:out value="${23/54}" />
</body>
</html>
Arithmetic Operator Mod
<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.ru/jstl/fmt" %>
<html>
<head>
<title>EL Expression Examples</title>
</head>
<body>
<h1>EL Expression Examples</h1>
<h2>Arithmetic Operators in Expressions</h2>
<c:out value="${2003 mod 8}" />
<br><br><br>
<c:out value="${2003 % 8}" />
</body>
</html>
JSTL Comparison Operator
<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.ru/jstl/fmt" %>
<html>
<head>
<title>EL Expression Examples</title>
</head>
<body>
<h1>EL Expression Examples</h1>
<h2>Logical Operators</h2>
<h2>Comparison Operators</h2>
4 > "3"
<c:out value="${4 > "3"}"/>
<br/>
"4" > 3
<c:out value="${"4" > 3}"/>
<br/>
"4" > "3"
<c:out value="${"4" > "3"}"/>
<br/>
4 >= 3
<c:out value="${4 >= 3}"/>
<br/>
4 <= 3
<c:out value="${4 < 3}"/>
<br/>
4 == "4"
<c:out value="${4 == 4}"/>
<br/>
</body>
</html>