You are here:   HomeJava Server PagesJava Standard Tag Lib (JSTL)JSTL Core c set Tag

<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="" 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.

Subscribe To Free Daily Newsletter!

Get Free News Updates Delivered Directly To Your Inbox
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.

What's New and Popular

Search Content

Advance Courses

Basic Courses

Advertise with Us