Thursday, September 25, 2008

JSTL- IF Condition

1- jars :

standard.jar
jstl.jar

2-tag library

you can add the tag libaray file.
e.g. c.tld

3-include the taglib in the jsp

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
if you don`t want to include the taglibrary file you can use (Jars must be included):
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

4- using the if element :

c:if test="${Condition}"
/c:if>

Example:

c:if test="${manger.billType=='1' || manger.billType=='16'}"
!-- ToDo --
/c:if


No comments: