Join us on Facebook

Please wait..10 Seconds Cancel

1.03.2014

// // Leave a Comment

Demonstration the use of JSTL by creating two functionalities of each JSTL tag. (c,xml,fun,sql)

JSTL tag

Core_Tags.jsp

 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<html> 
<head> 
<title>Core Tags</title> 
</head> 
<body> 
    <jsp:text> This Page Shows the Tag from Core Library!!</jsp:text> 
    <br/> 
     
    <br/> 
    <c:forEach var="i" begin="1" end="8"> 
    Lord of The Rings <c:out value="${i}"/><br/> 
    </c:forEach> 
        
    <c:set var="salary" scope="session" value="${2000*2}"/> 
    <c:if test="${salary > 2000}"> 
    <br/> 
    My salary is: <c:out value="${salary}"/> 
    </c:if> 
     
</body> 
</html> 

0 comments:

Post a Comment