आपकी ऑफलाइन सहायता

BACK
49

सी प्रोग्रामिंग

149

पाइथन प्रोग्रामिंग

49

सी प्लस प्लस

99

जावा प्रोग्रामिंग

149

जावास्क्रिप्ट

49

एंगुलर जे.एस.

69

पी.एच.पी.
माय एस.क्यू.एल.

99

एस.क्यू.एल.

Free

एच.टी.एम.एल.

99

सी.एस.एस.

149

आर प्रोग्रामिंग

39

जे.एस.पी.





डाउनलोड पी.डी.एफ. ई-बुक्स
JSTL - jstl core choose

<prefix:choose> ये tag; <prefix:when> और <prefix:otherwise> tag का parent tag होता है | इस tag के अन्दर इनके child tags के साथ conditional operations किये जाते है |

<prefix:choose> इस tag में दिए गए दो tags elseif statement के जैसे होते है |


Syntax for <prefix:choose> in JSTL

<prefix:choose>
<prefix:when test=${expression}>
---
</prefix:when>
<prefix:otherwise>  <%--this tag is optional --%>
---
</prefix:otherwise>
</prefix:choose>

<prefix:choose> Attribute in JSTL

<prefix:choose> tag के लिए कोई attribute नहीं होता है |


Example for <prefix:choose> Tag in JSTL

Source Code :
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<% int a = 10; %>   
<c:choose>  
<c:when test="${a < 5}">
a is less than 5
</c:when>
<c:when test="${a == 5}">
a is equal to 5
</c:when>
<c:otherwise>
a is greater than 5
</c:otherwise>
</c:choose>  
Output :
a is greater than 5