IfExample.jsp Page that uses the custom nested tags <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- Illustration of IfTag tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. --> <HTML> <HEAD> <TITLE>If Tag Example</TITLE> <LINK REL=STYLESHEET HREF="JSP-Styles.css" TYPE="text/css"> </HEAD> <BODY> <H1>If Tag Example</H1> <%@ taglib uri="cwp-taglib.tld" prefix="cwp" %> <cwp:if> <cwp:condition>true</cwp:condition> <cwp:then>Condition is true</cwp:then> <cwp:else>Condition is false</cwp:else> </cwp:if> <P> <cwp:if> <cwp:condition><%= request.isSecure() %></cwp:condition> <cwp:then>Request is using SSL (https)</cwp:then> <cwp:else>Request is not using SSL</cwp:else> </cwp:if> <P> Some coin tosses:<BR> <cwp:repeat reps="10"> <cwp:if> <cwp:condition><%= Math.random() < 0.5 %></cwp:condition> <cwp:then><B>Heads</B><BR></cwp:then> <cwp:else><B>Tails</B><BR></cwp:else> </cwp:if> </cwp:repeat> </BODY> </HTML>
Note: Brought from our old site: http://www.salearningschool.com/example_codes/ on Jan 2nd, 2017 From: http://sitestree.com/?p=10287
Categories:Programming Code Examples, Java/J2EE/J2ME, Applets and Basic Graphics
Tags:Java/J2EE/J2MEApplets and Basic Graphics
Post Data:2017-01-02 16:04:31
Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada