<c: if> this tag is similar to ‘IF’ control statement of java. This tag will use to execute when the given condition is true in the sense. Some attributes are used to implement in that tag like ‘test’ this is helpful to evaluate the condition….

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



          <title>&lt;c:if&gt;Tag Example In J.S.P</title>



             <c:set var="percentage" value="65"/>

               <c:if test="${percentage >= 60}">

                     <p><b><center><br><c:out value="You Have got First Division!"/>


                   <c:if test="${percentage < 60}">

                         <c:out value="You Have Got 2nd Division!"/>


                         <c:if test="${percentage < 50}">

                                <c:out value="You Have Got 3rd Division!"/></b></center></p></br>




                  JSTL Core c if Tag

About program

To call the taglib(tag library) for accessing the core tag in JSTL. After that declaring all the Html tags that is mandatory for procedure the way for tag using. In the body section if pass the value and put the condition if that condition falls true the required tag will evaluate the output on web browser.