{"id":27142,"date":"2021-05-12T23:10:05","date_gmt":"2021-05-13T03:10:05","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/ifexample-jsp-page-that-uses-the-custom-nested-tags-programming-code-examples-java-j2ee-j2me-applets-and-basic-graphics\/"},"modified":"2021-05-12T23:10:05","modified_gmt":"2021-05-13T03:10:05","slug":"ifexample-jsp-page-that-uses-the-custom-nested-tags-programming-code-examples-java-j2ee-j2me-applets-and-basic-graphics","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=27142","title":{"rendered":"IfExample.jsp Page that uses the custom nested tags #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics"},"content":{"rendered":"<pre>\nIfExample.jsp Page that uses the custom nested tags\n\n\n&lt;!DOCTYPE HTML PUBLIC &quot;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&quot;&gt;\n&lt;!-- \nIllustration of IfTag tag. \n\nTaken from Core Web Programming Java 2 Edition\nfrom Prentice Hall and Sun Microsystems Press,\n.\nMay be freely used or adapted. \n--&gt;\n&lt;HTML&gt;\n&lt;HEAD&gt;\n&lt;TITLE&gt;If Tag Example&lt;\/TITLE&gt;\n&lt;LINK REL=STYLESHEET\n      HREF=&quot;JSP-Styles.css&quot;\n      TYPE=&quot;text\/css&quot;&gt;\n&lt;\/HEAD&gt;\n&lt;BODY&gt;\n&lt;H1&gt;If Tag Example&lt;\/H1&gt;\n&lt;%@ taglib uri=&quot;cwp-taglib.tld&quot; prefix=&quot;cwp&quot; %&gt;\n&lt;cwp:if&gt;\n  &lt;cwp:condition&gt;true&lt;\/cwp:condition&gt;\n  &lt;cwp:then&gt;Condition is true&lt;\/cwp:then&gt;\n  &lt;cwp:else&gt;Condition is false&lt;\/cwp:else&gt;\n&lt;\/cwp:if&gt;\n&lt;P&gt;\n&lt;cwp:if&gt;\n  &lt;cwp:condition&gt;&lt;%= request.isSecure() %&gt;&lt;\/cwp:condition&gt;\n  &lt;cwp:then&gt;Request is using SSL (https)&lt;\/cwp:then&gt;\n  &lt;cwp:else&gt;Request is not using SSL&lt;\/cwp:else&gt;\n&lt;\/cwp:if&gt;\n&lt;P&gt;\nSome coin tosses:&lt;BR&gt;\n&lt;cwp:repeat reps=&quot;10&quot;&gt;\n  &lt;cwp:if&gt;\n    &lt;cwp:condition&gt;&lt;%= Math.random() &lt; 0.5 %&gt;&lt;\/cwp:condition&gt;\n    &lt;cwp:then&gt;&lt;B&gt;Heads&lt;\/B&gt;&lt;BR&gt;&lt;\/cwp:then&gt;\n    &lt;cwp:else&gt;&lt;B&gt;Tails&lt;\/B&gt;&lt;BR&gt;&lt;\/cwp:else&gt;\n  &lt;\/cwp:if&gt;\n&lt;\/cwp:repeat&gt;\n&lt;\/BODY&gt;\n&lt;\/HTML&gt;\n\n<\/pre>\n<p>Note: Brought from our old site: http:\/\/www.salearningschool.com\/example_codes\/ on Jan 2nd, 2017 From: http:\/\/sitestree.com\/?p=10287<br \/> Categories:Programming Code Examples, Java\/J2EE\/J2ME, Applets and Basic Graphics<br \/>Tags:Java\/J2EE\/J2MEApplets and Basic Graphics<br \/> Post Data:2017-01-02 16:04:31<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>IfExample.jsp Page that uses the custom nested tags &lt;!DOCTYPE HTML PUBLIC &quot;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&quot;&gt; &lt;!&#8211; 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. &#8211;&gt; &lt;HTML&gt; &lt;HEAD&gt; &lt;TITLE&gt;If Tag Example&lt;\/TITLE&gt; &lt;LINK REL=STYLESHEET HREF=&quot;JSP-Styles.css&quot; TYPE=&quot;text\/css&quot;&gt; &lt;\/HEAD&gt; &lt;BODY&gt; &lt;H1&gt;If &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=27142\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-27142","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":10476,"url":"http:\/\/bangla.sitestree.com\/?p=10476","url_meta":{"origin":27142,"position":0},"title":"IfExample.jsp Page that uses the custom nested tags","author":"","date":"August 29, 2015","format":false,"excerpt":"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\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10154,"url":"http:\/\/bangla.sitestree.com\/?p=10154","url_meta":{"origin":27142,"position":1},"title":"HelloWWW.java Servlet that generates HTML. This and all remaining servlets are in the cwp package and therefore should be installed in the cwp subdirectory.","author":"","date":"August 14, 2015","format":false,"excerpt":"HelloWWW.java\u00a0 Servlet that generates HTML. This and all remaining servlets are in the cwp package and therefore should be installed in the cwp subdirectory. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; \/** Simple servlet that generates HTML. \u00a0* \u00a0 \u00a0*\u00a0 Taken from Core Web Programming Java 2 Edition \u00a0*\u00a0\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26519,"url":"http:\/\/bangla.sitestree.com\/?p=26519","url_meta":{"origin":27142,"position":2},"title":"HelloWWW.java  Servlet that generates HTML. This and all remaining servlets are in the cwp package and therefore should be installed in the cwp subdirectory. #Programming Code Examples #Java\/J2EE\/J2ME #Servlet","author":"Author-Check- Article-or-Video","date":"April 27, 2021","format":false,"excerpt":"HelloWWW.java Servlet that generates HTML. This and all remaining servlets are in the cwp package and therefore should be installed in the cwp subdirectory. package cwp; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; \/** Simple servlet that generates HTML. * * Taken from Core Web Programming Java 2 Edition * from\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10451,"url":"http:\/\/bangla.sitestree.com\/?p=10451","url_meta":{"origin":27142,"position":3},"title":"SimplePrimeExample.jsp Page that uses the SimplePrimeTag custom tag","author":"","date":"August 28, 2015","format":false,"excerpt":"SimplePrimeExample.jsp Page that uses the SimplePrimeTag custom tag <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Illustration of SimplePrimeTag 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>Some 50-Digit Primes<\/TITLE> <LINK REL=STYLESHEET\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10464,"url":"http:\/\/bangla.sitestree.com\/?p=10464","url_meta":{"origin":27142,"position":4},"title":"DebugExample.jsp Page that uses the DebugTag custom tag","author":"","date":"August 28, 2015","format":false,"excerpt":"# DebugExample.jsp Page that uses the DebugTag custom tag <!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\"> <!-- Illustration of SimplePrimeTag 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>Using the Debug Tag<\/TITLE>\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10444,"url":"http:\/\/bangla.sitestree.com\/?p=10444","url_meta":{"origin":27142,"position":5},"title":"cwp-taglib.tld Tag Library Descriptor file used by the custom tags in this chapter.","author":"","date":"August 28, 2015","format":false,"excerpt":"cwp-taglib.tld Tag Library Descriptor file used by the custom tags in this chapter. <?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> <!DOCTYPE taglib \u00a0PUBLIC \"-\/\/Sun Microsystems, Inc.\/\/DTD JSP Tag Library 1.1\/\/EN\" \u00a0\"http:\/\/java.sun.com\/j2ee\/dtds\/web-jsptaglibrary_1_1.dtd\"> <!-- a tag library descriptor --> <taglib> \u00a0 <!-- after this the default space is \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"http:\/\/java.sun.com\/j2ee\/dtds\/jsptaglibrary_1_2.dtd\" \u00a0\u00a0 --> \u00a0 <tlibversion>1.0<\/tlibversion> \u00a0\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/27142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27142"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/27142\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27142"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}