{"id":10462,"date":"2015-08-28T00:43:04","date_gmt":"2015-08-28T04:43:04","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/?p=10462"},"modified":"2015-08-24T10:28:23","modified_gmt":"2015-08-24T14:28:23","slug":"debugtag-java-custom-tag-that-optionally-makes-use-of-a-tag-body","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=10462","title":{"rendered":"DebugTag.java Custom tag that optionally makes use of a tag body"},"content":{"rendered":"<pre>DebugTag.java Custom tag that optionally makes use of a tag body\r\n\r\npackage cwp.tags;\r\n\r\nimport javax.servlet.jsp.*;\r\nimport javax.servlet.jsp.tagext.*;\r\nimport java.io.*;\r\nimport javax.servlet.*;\r\n\r\n\/** A tag that includes the body content only if\r\n\u00a0*\u00a0 the \"debug\" request parameter is set.\r\n\u00a0*\u00a0 &lt;P&gt;\r\n\u00a0*\u00a0 Taken from Core Web Programming Java 2 Edition\r\n\u00a0*\u00a0 from Prentice Hall and Sun Microsystems Press,\r\n\u00a0*\u00a0 .\r\n\u00a0*\u00a0 May be freely used or adapted.\r\n\u00a0*\/\r\n\r\npublic class DebugTag extends TagSupport {\r\n\u00a0 public int doStartTag() {\r\n\u00a0\u00a0\u00a0 ServletRequest request = pageContext.getRequest();\r\n\u00a0\u00a0\u00a0 String debugFlag = request.getParameter(\"debug\");\r\n\u00a0\u00a0\u00a0 if ((debugFlag != null) &amp;&amp;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (!debugFlag.equalsIgnoreCase(\"false\"))) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 return(EVAL_BODY_INCLUDE);\r\n\u00a0\u00a0\u00a0 } else {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 return(SKIP_BODY);\r\n\u00a0\u00a0\u00a0 }\r\n\u00a0 }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>DebugTag.java Custom tag that optionally makes use of a tag body package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import javax.servlet.*; \/** A tag that includes the body content only if \u00a0*\u00a0 the &#8220;debug&#8221; request parameter is set. \u00a0*\u00a0 &lt;P&gt; \u00a0*\u00a0 Taken from Core Web Programming Java 2 Edition \u00a0*\u00a0 from Prentice Hall and Sun &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=10462\">Continue reading<\/a><\/p>\n","protected":false},"author":130,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1417,1424],"tags":[706,308,285],"class_list":["post-10462","post","type-post","status-publish","format-standard","hentry","category-code-programming-samples--","category-javaj2eej2me","tag-code","tag-java","tag-285","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":27119,"url":"http:\/\/bangla.sitestree.com\/?p=27119","url_meta":{"origin":10462,"position":0},"title":"DebugTag.java Custom tag that optionally makes use of a tag body #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics","author":"Author-Check- Article-or-Video","date":"May 11, 2021","format":false,"excerpt":"DebugTag.java Custom tag that optionally makes use of a tag body package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import javax.servlet.*; \/** A tag that includes the body content only if * the \"debug\" request parameter is set. * <P> * Taken from Core Web Programming Java 2 Edition *\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":10464,"url":"http:\/\/bangla.sitestree.com\/?p=10464","url_meta":{"origin":10462,"position":1},"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":27121,"url":"http:\/\/bangla.sitestree.com\/?p=27121","url_meta":{"origin":10462,"position":2},"title":"# DebugExample.jsp Page that uses the DebugTag custom tag #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics","author":"Author-Check- Article-or-Video","date":"May 11, 2021","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;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":10467,"url":"http:\/\/bangla.sitestree.com\/?p=10467","url_meta":{"origin":10462,"position":3},"title":"FilterTag.java Custom tag that modifies the tag body","author":"","date":"August 28, 2015","format":false,"excerpt":"FilterTag.java Custom tag that modifies the tag body package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import cwp.*; \/** A tag that replaces <, >, \", and & with their HTML \u00a0*\u00a0 character entities (<, >, \", and &). \u00a0*\u00a0 After filtering, arbitrary strings can be placed \u00a0*\u00a0 in either\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":10473,"url":"http:\/\/bangla.sitestree.com\/?p=10473","url_meta":{"origin":10462,"position":4},"title":"IfTag.java, IfConditionTag.java, IfThenTag.java, and IfElseTag.java, Custom tags that make use of tag nesting","author":"","date":"August 28, 2015","format":false,"excerpt":"IfTag.java, IfConditionTag.java, IfThenTag.java, and IfElseTag.java, Custom tags that make use of tag nesting IfTag.java package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import javax.servlet.*; \/** A tag that acts like an if\/then\/else. \u00a0*\u00a0 <P> \u00a0*\u00a0 Taken from Core Web Programming Java 2 Edition \u00a0*\u00a0 from Prentice Hall and Sun Microsystems\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":27129,"url":"http:\/\/bangla.sitestree.com\/?p=27129","url_meta":{"origin":10462,"position":5},"title":"IfTag.java, IfConditionTag.java, IfThenTag.java, and IfElseTag.java, Custom tags that make use of tag nesting #Programming Code Examples #Java\/J2EE\/J2ME #Applets and Basic Graphics","author":"Author-Check- Article-or-Video","date":"May 11, 2021","format":false,"excerpt":"IfTag.java, IfConditionTag.java, IfThenTag.java, and IfElseTag.java, Custom tags that make use of tag nesting IfTag.java package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import javax.servlet.*; \/** A tag that acts like an if\/then\/else. * <P> * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems\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":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10462","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\/130"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10462"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10462\/revisions"}],"predecessor-version":[{"id":10463,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10462\/revisions\/10463"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10462"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}