The general way of writing an EL expression:

<body>
    
    <h1>EL expression</h1>
    	Four arithmetic operations ${2+5 }<br>
    	Constant output: ${2+5 }<br>
    	Equal to 2==2: ${2==2 } , ${2 eq 2 }<br>
    <br>
   		 Not equal to 5 != 5: ${5 != 5 } ,${5 ne 5 }
    <br>
    	Take the remainder: ${10%3 },${10 mod 3 }
    <br>
   		 Less than: ${5<2 } ,${5 lt 2 }
    <br>
    	Greater than: ${5 > 10 }
    <br>
   		 Less than or equal to: ${5 <= 10 }
    <br>
   		Greater than or equal to: ${5>=3 }
    <br>
 		逻辑与:${ true && true },${true and true }
    <br>
		Logical OR: ${false || false } , ${false or false }   
    <br>
		Logical NOT: ${!true } ,${not true }   
    <br>
    	判空:${empty "" }
    <br>
		非空:${empty not "" }
  </body>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325931579&siteId=291194637