JSP JSTL < x: choose > tag: complete condition judgment
•
Java
body content(
and
subtags)
Example
<%@taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <c:import url="shopInfo.xml" var="xmlFile" charEncoding="gbk"/> <x:parse var="shopInfo" doc="${xmlFile}"></x:parse> <x:choose> <x:when select="$shopInfo/shops/shop[name='C语言中文网'][sellAmount/@value> 500000]">商业能手</x:when> <x:when select="$shopInfo/shops/shop[name='C语言中文网'][sellAmount/@value <500000][sellAmount/@value>100000]">身手小试</x:when> <x:otherwise>初学下海</x:otherwise> </x:choose>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码